Skip to content
This repository was archived by the owner on Oct 18, 2022. It is now read-only.

BaseUpdateView title uses the object and not the BD model instance #105

Open
diegobeckdorf opened this issue Jul 26, 2021 · 1 comment
Open

Comments

@diegobeckdorf
Copy link

When the model str method uses attributes that might be updated but fail on validations the update template breadcrumbs and title will show the object to_str using the user input that failed.
The BaseUpdateView context title should be loaded using the DB saved instance or the object before assigning the form input attributes

@acolazo
Copy link

acolazo commented Jul 27, 2021

Probably a self.object.refresh_from_db() fixes the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants