Skip to content

Commit

Permalink
Merge pull request #183 from PROCOLLAB-github/feature/project-drafts
Browse files Browse the repository at this point in the history
Мануальная установка draft статуса у проектов
  • Loading branch information
Yakser authored Sep 1, 2023
2 parents 0da6bbf + 2e35c76 commit d7f764f
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions projects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,6 @@ def get_short_description(self) -> Optional[str]:
def get_collaborators_user_list(self) -> list[User]:
return [collaborator.user for collaborator in self.collaborator_set.all()]

def save(
self, force_insert=False, force_update=False, using=None, update_fields=None
):
# if every field is filled, set draft to false
if (
self.name
and self.description
and self.region
and (self.step is not None)
and self.industry
and self.presentation_address
and self.image_address
):
self.draft = False
super().save(force_insert, force_update, using, update_fields)

def __str__(self):
return f"Project<{self.id}> - {self.name}"

Expand Down

0 comments on commit d7f764f

Please sign in to comment.