Skip to content

Commit

Permalink
update link text casing
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrey committed Oct 29, 2024
1 parent 1006a96 commit 194d40b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 4.2.15 on 2024-10-24 20:25
# Generated by Django 4.2.15 on 2024-10-29 20:03

from django.db import migrations, models
import django.db.models.deletion
Expand All @@ -14,23 +14,23 @@ class Migration(migrations.Migration):
operations = [
migrations.AddField(
model_name="document",
name="link",
name="link_text",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name="document_link",
related_name="document_link_text",
to="translations.translation",
),
),
migrations.AddField(
model_name="document",
name="linkText",
name="link_url",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name="document_link_text",
related_name="document_link",
to="translations.translation",
),
),
Expand Down
6 changes: 3 additions & 3 deletions programs/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ def create_instance(cls, external_name: str, Model: type["Document"]) -> "Docume
class Document(models.Model):
external_name = models.CharField(max_length=120, blank=True, null=True, unique=True)
text = models.ForeignKey(Translation, related_name="documents", blank=False, null=False, on_delete=models.PROTECT)
link = models.ForeignKey(Translation, related_name="document_link", blank=True, null=True, on_delete=models.PROTECT)
linkText = models.ForeignKey(Translation, related_name="document_link_text", blank=True, null=True, on_delete=models.PROTECT)
link_url = models.ForeignKey(Translation, related_name="document_link", blank=True, null=True, on_delete=models.PROTECT)
link_text = models.ForeignKey(Translation, related_name="document_link_text", blank=True, null=True, on_delete=models.PROTECT)

objects = DocumentManager()

Expand Down Expand Up @@ -243,7 +243,7 @@ class ProgramDataController(ModelDataController["Program"]):

FplDataType = TypedDict("FplDataType", {"year": str, "period": str})
LegalStatusesDataType = list[TypedDict("LegalStatusDataType", {"status": str})]
DocumentDataType = TypedDict("DocDataType", {"text": str, "link": str, "link_text": str})
DocumentDataType = TypedDict("DocDataType", {"text": str, "link_url": str, "link_text": str})
DataType = TypedDict(
"DataType",
{
Expand Down
4 changes: 2 additions & 2 deletions screener/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,8 @@ def serialized_navigator(navigator):
def serialized_document(document):
return {
"text": default_message(document.text),
"link": default_message(document.link),
"link_text": default_message(document.linkText),
"link_url": default_message(document.link_url),
"link_text": default_message(document.link_text),
}


Expand Down

0 comments on commit 194d40b

Please sign in to comment.