Skip to content

Commit

Permalink
Remove dependency of invoice delete on PROJECT_ENABLED Flag (#3690)
Browse files Browse the repository at this point in the history
If the PROJECT_ENABLED=False then the invoice should not be created at
the first place. But somehow at some point projects where enabled and
there are project and invoices in the system. The system should function
as expected compared to lacking functionality in/between.

This PR remove the PROJECT_ENABLED check on the project's
get_absolute_url, which is used while deleting invoices or potentially
at the other places.

closes #3663
  • Loading branch information
theskumar authored Dec 18, 2023
1 parent 0d99f66 commit c6ffaae
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions hypha/apply/projects/models/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,7 @@ def editable(self):
return False

def get_absolute_url(self):
if settings.PROJECTS_ENABLED:
return reverse("apply:projects:detail", args=[self.id])
return "#"
return reverse("apply:projects:detail", args=[self.id])

@property
def can_make_approval(self):
Expand Down

0 comments on commit c6ffaae

Please sign in to comment.