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

Set default values for boolean fields on Chant creation #1717

Open
lucasmarchd01 opened this issue Nov 22, 2024 · 0 comments
Open

Set default values for boolean fields on Chant creation #1717

lucasmarchd01 opened this issue Nov 22, 2024 · 0 comments

Comments

@lucasmarchd01
Copy link
Contributor

Create a new chant in the database. When the chant is saved, the fields for manuscript_full_text_std_proofread, manuscript_full_text_proofread and volpiano_proofread will be NULL:

cantusdb=# SELECT
    id,
    manuscript_full_text_std_proofread,
    manuscript_full_text_proofread,
    volpiano_proofread
FROM main_app_chant
WHERE id = 1005633;
   id    | manuscript_full_text_std_proofread | manuscript_full_text_proofread | volpiano_proofread 
---------+------------------------------------+--------------------------------+--------------------
 1005633 |                                    |                                | 
(1 row)

Edit and save the chant one more time, and only then are default values of False added to these fields:

cantusdb=# SELECT
    id,
    manuscript_full_text_std_proofread,
    manuscript_full_text_proofread,
    volpiano_proofread
FROM main_app_chant
WHERE id = 1005633;
   id    | manuscript_full_text_std_proofread | manuscript_full_text_proofread | volpiano_proofread 
---------+------------------------------------+--------------------------------+--------------------
 1005633 | f                                  | f                              | f
(1 row)

We should have a default value set for these fields when a Chant is initially created. We should also check other fields to make sure it isn't happening elsewhere.

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

No branches or pull requests

1 participant