Skip to content

Commit

Permalink
Merge pull request #226 from volunteers-for-city-projects/update_seri…
Browse files Browse the repository at this point in the history
…alizers

Update Project serializer
  • Loading branch information
1yunker authored Nov 20, 2023
2 parents 326043d + 3be3f49 commit 5a2c9c2
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions backend/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,20 +197,6 @@ def get_status(self, data):
CANCELED = 'canceled_by_organizer'
EDITING = 'editing'

# now = timezone.now()
# if data.status_approve == Project.CANCELED_BY_ORGANIZER:
# return CANCELED
# elif data.start_datetime <= now < data.start_date_application:
# return OPEN
# elif data.start_date_application <= now < data.end_date_application:
# return READY
# elif data.end_date_application <= now < data.end_datetime:
# return CLOSED
# elif data.end_datetime <= now:
# return COMPLETED
# else:
# return 'Статус проекта не определен'

if data.status_approve == Project.CANCELED_BY_ORGANIZER:
return CANCELED
elif data.status_approve == Project.APPROVED:
Expand Down Expand Up @@ -248,6 +234,7 @@ class Meta:
'city',
'categories',
'participants',
'admin_comments',
'status_approve',
'skills',
'is_favorited',
Expand Down

0 comments on commit 5a2c9c2

Please sign in to comment.