Skip to content

Commit

Permalink
Unarchive the provider themselves too
Browse files Browse the repository at this point in the history
  • Loading branch information
mrchrisadams committed May 3, 2024
1 parent 9e58630 commit 3ecf98f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/accounts/models/provider_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ def approve(self) -> Hostingprovider:
hp.request = self
hp.created_by = self.created_by

# if we have approved a submission from a provider
hp.archived = False

# set services (https://django-taggit.readthedocs.io/en/latest/api.html)
hp.services.set(list(self.services.all()))
hp.staff_labels.add("up-to-date")
Expand Down
1 change: 1 addition & 0 deletions apps/accounts/tests/test_provider_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@ def test_approve_updates_existing_provider(hosting_provider_with_sample_user):
# provider is visible by default
# appropriate tag is added
assert hp.showonwebsite is True
assert hp.archived is False
assert "up-to-date" in hp.staff_labels.slugs()
# "other-none" is the label condition check for
# when someone is just trying to get a site marked
Expand Down

0 comments on commit 3ecf98f

Please sign in to comment.