Skip to content
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

GITC-465: Use a human sortable date/time string for bsci s3 uploads #9547

Merged
merged 2 commits into from
Oct 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/grants/models/clr_match.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ class CLRMatch(SuperModel):

def __str__(self):
"""Return the string representation of a Grant."""
return f"id: {self.pk}, grant: {self.grant.pk}, round: {self.round_number}, amount: {self.amount}"
return f"id: {self.pk}, grant: {self.grant.pk}, round: {self.round_number}, amount: {self.amount}"
2 changes: 1 addition & 1 deletion app/grants/models/grant_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ class GrantTag(SuperModel):

def __str__(self):
"""Return the string representation of a GrantTag."""
return f"{self.name}"
return f"{self.name}"
2 changes: 1 addition & 1 deletion app/grants/models/match_pledge.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ def data_json(self):

def __str__(self):
"""Return the string representation of this object."""
return f"{self.profile} <> {self.amount} DAI"
return f"{self.profile} <> {self.amount} DAI"
2 changes: 1 addition & 1 deletion app/grants/models/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,4 +554,4 @@ def create_contribution(self, tx_id, is_successful_contribution=True):
successful_contribution(self.grant, self, contribution)

update_grant_metadata.delay(self.pk)
return contribution
return contribution
3 changes: 2 additions & 1 deletion app/grants/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3722,7 +3722,8 @@ def upload_sybil_csv(request):
bsciJSON = StaticJsonEnv.objects.get(key='BSCI_SYBIL_TOKEN')

now = datetime.now()
file_name = f'{now.strftime("%m-%d-%Y")}.csv'
# year-month-day-hour-minute (sortable)
file_name = f'{now.strftime("%Y-%m-%d-%H-%M")}.csv'

try:
# upload to S3
Expand Down