Skip to content

Commit

Permalink
Change source title and siglum to optional
Browse files Browse the repository at this point in the history
This is to allow saving sources in the create / edit without triggering a validation error.
  • Loading branch information
ahankinson committed Jun 18, 2024
1 parent 73d5df4 commit 1168e29
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Generated by Django 4.1.6 on 2024-06-18 12:44

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("main_app", "0021_source_shelfmark"),
]

operations = [
migrations.AlterField(
model_name="source",
name="siglum",
field=models.CharField(
blank=True,
help_text="RISM-style siglum + Shelf-mark (e.g. GB-Ob 202).",
max_length=63,
null=True,
),
),
migrations.AlterField(
model_name="source",
name="title",
field=models.CharField(
blank=True,
help_text="Full Source Identification (City, Archive, Shelf-mark)",
max_length=255,
null=True,
),
),
]
6 changes: 4 additions & 2 deletions django/cantusdb_project/main_app/models/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ class Source(BaseModel):

title = models.CharField(
max_length=255,
blank=True,
null=True,
help_text="Full Source Identification (City, Archive, Shelf-mark)",
)
# the siglum field as implemented on the old Cantus is composed of both the RISM siglum and the shelfmark
# it is a human-readable ID for a source
siglum = models.CharField(
max_length=63,
null=False,
blank=False,
null=True,
blank=True,
help_text="RISM-style siglum + Shelf-mark (e.g. GB-Ob 202).",
)
holding_institution = models.ForeignKey(
Expand Down

0 comments on commit 1168e29

Please sign in to comment.