-
Notifications
You must be signed in to change notification settings - Fork 3
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
fix deletion of entity objects / GenericEntitiesDeleteView #458
Conversation
2c8d3e2
to
875f597
Compare
39feb04
to
c19ad69
Compare
Update on why this is still a draft:
|
c19ad69
to
e84a2f3
Compare
Reworked to solve only the most pressing issue, see this comment. Interestingly, this actually shows the object name in the confirmation template for me now. 🤔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shows the __str__
of the object being deleted, seen as a RootObject
- RootObject.__str__
returns RootObject.name
. This works, but we are also planning on getting rid of RootObject.name
. If we instead use get_queryset
instead of setting the model:
def get_queryset(self):
return self.entity_model.objects.all()
it should instead use the __str__
of the specific entity (i.e. if the Person
entity overrides the __str__
(i.e. to include first_name
) it uses that one) - could you try that?
Ahh, right! Sorry, forgot that we discussed this (I think), will change it. |
In GenericEntitiesDeleteView, override get_queryset() method instead of referencing a specific (parent) model to get at the object-to-be-deleted. Closes #485
e84a2f3
to
87c50f1
Compare
Thanks! |
No description provided.