-
Notifications
You must be signed in to change notification settings - Fork 10
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
✨ [#315] added extra version and uuid fields in admin #393
Conversation
4afd616
to
d296fc6
Compare
src/objects/core/models.py
Outdated
@@ -40,6 +40,17 @@ def url(self): | |||
# zds_client.get_operation_url() can be used here but it increases HTTP overhead | |||
return f"{self.service.api_root}objecttypes/{self.uuid}" | |||
|
|||
@property | |||
def version(self): |
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.
It's not a version, it's rather the last available version. But the thing is that we specify the objecttype version in the object data, Objecttype model has only a link to objecttype itself.
@joeribekker Do we really want in the list admin view to perform a lot of HTTP requests to get the last version?
Even if you want to go this was, I think it's more useful to show the list of all versions available, not the last one.
And if you want to see them in the list view, it's better to perform one list request to Objecttypes API instead of a lot of individual detail requests
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.
I think I specced this ticket too easily. And we dont want to do many http calls here. I will respec the ticket.
2207eab
to
01ac34a
Compare
01ac34a
to
c3057d2
Compare
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.
Please rebase on master and resolve the conflcts
c3057d2
to
517c8d4
Compare
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.
Please remove get_uuid from readonly fields in PermissionAdmin
. if it's not shown on the detail page,
517c8d4
to
491d1ab
Compare
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.
👍
Fixes #315
Changes
Added some version and uuid fields in the admin panel.