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

Further fixes for institution migration #1570

Merged
merged 2 commits into from
Jul 22, 2024
Merged

Conversation

ahankinson
Copy link
Member

This PR introduces a couple small changes in support of the institution migration.

  • Makes "title" and "siglum" read-only for sources. Since these are no longer used they should not be edited, but there was a request to keep them around for a while. Setting them to read-only in the admin interface removes all practical methods of adding or editing these fields until they are dropped entirely.
  • Makes a small adjustment to the migration script to add a RISM id to the "XX-NN" institution (Unknown).

This makes the 'title' and 'siglum' fields read-only in the admin interface.

Since they have already been removed from the other editing forms, this means there is no practical way of editing these values. This effectively makes them read-only until they are dropped (there was a request to keep them around for a little while.)
The XX-NN siglum (Unknown) has a RISM Online record, so it should be attached like the others.
Comment on lines +31 to 34
readonly_fields = ("title", "siglum") + READ_ONLY + (
"number_of_chants",
"number_of_melodies",
"date_created",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
readonly_fields = ("title", "siglum") + READ_ONLY + (
"number_of_chants",
"number_of_melodies",
"date_created",
readonly_fields = READ_ONLY + (
"title",
"siglum",
"number_of_chants",
"number_of_melodies",
"date_created",

Copy link
Member Author

Choose a reason for hiding this comment

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

I did it this way so that title and siglum appear at the top of the read-only field block

@dchiller dchiller merged commit 791f8b3 into develop Jul 22, 2024
1 check passed
@dchiller dchiller deleted the further-fixes-institutions branch July 22, 2024 12:11
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.

3 participants