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

DST-951 - Save & Return - Second trio of views #190

Merged
merged 39 commits into from
Feb 11, 2025
Merged

Conversation

chris-pettinga
Copy link
Collaborator

No description provided.

@chris-pettinga chris-pettinga requested a review from a team as a code owner February 4, 2025 18:07
@chris-pettinga chris-pettinga changed the base branch from save-and-return to DST-950 February 10, 2025 11:54
licence.professional_or_business_services = []
licence.licensing_grounds = []

if old_value == TypeOfServicesChoices.interception_or_monitoring.value:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@property
def pk_url_kwarg(self) -> str:
if self.model:
return f"{self.model.__name__.lower()}_uuid"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool!

@@ -94,13 +103,11 @@ def get_success_url(self) -> str:
else:
success_url = reverse("where_is_the_business_located", kwargs={"business_uuid": self.kwargs.get("business_uuid")})

if get_parameters := urllib.parse.urlencode(self.request.GET):
success_url += "?" + get_parameters
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we no longer need this for the redirect url parameter? Is that in the baseview already?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@morganmaerees - this is all handled by the baseview already


if type_of_service := self.changed_fields.get("type_of_service", False):
if self.form.has_field_changed("type_of_service"):
# if the type of service has changed, we want to clear the session data for the next steps
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this comment matches what's happening anymore, this is done elsewhere

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point!

@@ -289,7 +292,7 @@

SESSION_EXPIRE_AT_BROWSER_CLOSE = True
# Session cookie age is set to 40 minutes
SESSION_COOKIE_AGE = 40 * 60
SESSION_COOKIE_AGE = 500 * 60
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this just for testing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes good spot, thanks.

@chris-pettinga chris-pettinga changed the base branch from DST-950 to save-and-return February 10, 2025 21:27
@chris-pettinga chris-pettinga merged commit 07165d1 into save-and-return Feb 11, 2025
6 of 7 checks passed
@chris-pettinga chris-pettinga deleted the DST-951 branch February 11, 2025 10:34
jenriordan pushed a commit that referenced this pull request Feb 11, 2025
* business journey

* alter delete view and fix tests

* updating individual views to save and return

* yourself views

* fixing tests

* fixing test

* Delete view requiers login

* add formclass to delete view

* updating migrations

* removing print statements

* modifiying uuid field migration

* Adding default to uuid for migration

* updating migrations again

* get uuid as primary key field

* updating to use id instead of uuid

* review comments

* Updating yourself views

* licence id object

* Making slow work

* More fixes

* migration fixing

* fixing tests

* migrations

* mypi

* fixing tests

* fixing tests

* fixing tests

* fixing tests

* fixing tests

* fixing tests

* fixing tests

* fixing tests

* fixing FE tests

* Morgan comments

* fixing tests

* fixing tests

---------

Co-authored-by: Morgan Rees <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants