-
-
Notifications
You must be signed in to change notification settings - Fork 775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Fixes: https://github.com/gitcoinco/web/issues/1855 #2371
Conversation
…ate Bounty with flag - requested.
app/bounty_requests/models.py
Outdated
@@ -22,8 +22,14 @@ | |||
from django.core.validators import MinValueValidator | |||
from django.db import models | |||
|
|||
from datetime import date, datetime, timedelta |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F401 'datetime.date' imported but unused
app/bounty_requests/models.py
Outdated
|
||
def to_bounty(self, network=None): | ||
"""Creates a bounty with project status as requested. """ | ||
print ('self value is {} - {} - Type {}'.format(self.github_url, self.amount, type(self.amount))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E211 whitespace before '('
app/bounty_requests/models.py
Outdated
def to_bounty(self, network=None): | ||
"""Creates a bounty with project status as requested. """ | ||
print ('self value is {} - {} - Type {}'.format(self.github_url, self.amount, type(self.amount))) | ||
new_bounty = Bounty.objects.create( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F841 local variable 'new_bounty' is assigned to but never used
app/bounty_requests/models.py
Outdated
value_true=float(self.amount), | ||
network=network, | ||
web3_created=datetime.now(tz=pytz.UTC), | ||
expires_date=datetime.now(tz=pytz.UTC) + timedelta(days=90), # Request expire in 3 months. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E261 at least two spaces before inline comment
W291 trailing whitespace
app/bounty_requests/models.py
Outdated
network=network, | ||
web3_created=datetime.now(tz=pytz.UTC), | ||
expires_date=datetime.now(tz=pytz.UTC) + timedelta(days=90), # Request expire in 3 months. | ||
is_open=False, # By default mark this as False as this will require fund. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E261 at least two spaces before inline comment
W291 trailing whitespace
app/bounty_requests/models.py
Outdated
expires_date=datetime.now(tz=pytz.UTC) + timedelta(days=90), # Request expire in 3 months. | ||
is_open=False, # By default mark this as False as this will require fund. | ||
raw_data={}, | ||
current_bounty=True # By default it would be marked as the current bounty. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E261 at least two spaces before inline comment
W291 trailing whitespace
app/bounty_requests/models.py
Outdated
current_bounty=True # By default it would be marked as the current bounty. | ||
) | ||
|
||
print ('Bounty is created. ') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E211 whitespace before '('
app/dashboard/models.py
Outdated
@@ -544,6 +545,8 @@ def status(self): | |||
if not self.is_open: | |||
if self.accepted: | |||
return 'done' | |||
elif self.idx_status=='requested': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E225 missing whitespace around operator
Codecov Report
@@ Coverage Diff @@
## master #2371 +/- ##
==========================================
+ Coverage 29.47% 29.49% +0.01%
==========================================
Files 146 146
Lines 11777 11787 +10
Branches 1599 1600 +1
==========================================
+ Hits 3471 3476 +5
- Misses 8188 8192 +4
- Partials 118 119 +1
Continue to review full report at Codecov.
|
@@ -64,3 +69,18 @@ class BountyRequest(SuperModel): | |||
def __str__(self): | |||
"""Return the string representation of BountyRequest.""" | |||
return f"{self.requested_by.username} / {self.created_on}" | |||
|
|||
def to_bounty(self, network=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we associate the bountyrequest with the bounty?
@saketbairoliya2 Is this still a WIP? |
Yes, I'll try to finish it this week. Apologies for delay.
kumar saket
…On Thu, Oct 11, 2018, 5:14 PM Mark Beacom ***@***.*** wrote:
⭐️ PR built and available in a preview environment *gitcoinco-web-pr-2371*
here <http://web.jx-gitcoinco-web-pr-2371.ci.gitcoin.co>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2371 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AFrIAYHrdk6FYlpNZaUzPMItz0Qa0Oj_ks5ujy8GgaJpZM4XLxHk>
.
|
In general is looking good but need a rebase with the current explorer changes, lot of things had changed in the explorer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need rebase with master changes in explorer
@saketbairoliya2 @octavioamu i rebased it over at #3734 |
Closing this out based on above comment ^ |
Description
This PR will handle creation of Bounty directly when a request is submitted.
Checklist
Affected core subsystem(s)
Testing
Refers/Fixes
Refs: #1855