-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Issue in License model #14093
Copy link
Copy link
Open
Description
Expected Behavior
The identifier should be unique and notnull.
Also, not being the database PK, it should be editable.
Actual Behavior
The identifier can be empty and duplicated.
It can not be edited in the admin page:
It means that only licenses loaded from fixtures have a non empty identifier
The metadata editor relies on the identifier field. This means that when a metadata using one of the licenses added in the admin page is saved, the server procedures will try and load a license filtering by an empty identifier, raising an error (get() returned more than one License).
TODO:
- make identifier editable (also, a design decision should be about the semantics of the identifier and abbreviation field)
- make identifier unique
- change the model
- add backward-safe migrations in order to populate the identifier field if empty
- change the metadata editor procedures to use the id instead of the identifier
Steps to Reproduce the Problem
- create a couple of new licenses
- edit a resource metadata using one of them
- save the resource and check the logs
Specifications
- GeoNode version: 5.0, master
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels