Skip to content

Commit

Permalink
Minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
pesikj committed Dec 6, 2024
1 parent 688ac4f commit cc71058
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions webclient/doi/model_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def _serialize_komponenty_m2n_fields(komponenty):
def serialize_organizace(organizace: Organizace):
serialized_organizace = {"name": organizace.nazev}
if organizace.ror:
serialized_organizace["affiliationIdentifier"] = f"https://ror.org/{organizace.ro}"
serialized_organizace["affiliationIdentifier"] = f"https://ror.org/{organizace.ror}"
serialized_organizace["affiliationIdentifierScheme"] = "ROR"
serialized_organizace["schemeUri"] = "https://ror.org/"
return serialized_organizace
Expand Down Expand Up @@ -451,7 +451,9 @@ def _serialize_rights_list(self):
spdx_query = self.object.licence.heslar_odkaz.filter(zdroj="SPDX")
if spdx_query.exists():
serialized_rights["rightsUri"] = self.object.licence.heslar_odkaz.filter(zdroj="SPDX").first().uri
serialized_rights["schemeUri"] = self.object.licence.heslar_odkaz.filter(zdroj="SPDX").first().uri
serialized_rights["schemeUri"] = (
self.object.licence.heslar_odkaz.filter(zdroj="SPDX").first().scheme_uri
)
serialized_rights["rightsIdentifier"] = (
self.object.licence.heslar_odkaz.filter(zdroj="SPDX").first().kod
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 5.1.3 on 2024-11-30 18:54
# Generated by Django 5.1.3 on 2024-12-06 20:32

from django.db import migrations, models

Expand All @@ -7,12 +7,12 @@ class Migration(migrations.Migration):

dependencies = [
("dokument", "0012_alter_dokument_options_and_more"),
("heslar", "0007_alter_heslar_unique_together_and_more"),
("heslar", "0008_heslarodkaz_scheme_uri"),
]

operations = [
migrations.AddField(
model_name="dokumentcast",
model_name="dokument",
name="doi",
field=models.CharField(blank=True, max_length=255, null=True),
),
Expand Down
2 changes: 1 addition & 1 deletion webclient/dokument/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ class Dokument(ExportModelOperationsMixin("dokument"), ModelWithMetadata):
tvary = models.ManyToManyField(Heslar, through="Tvar", related_name="dokumenty_tvary")
autori_snapshot = models.CharField(max_length=5000, null=True, blank=True)
osoby_snapshot = models.CharField(max_length=5000, null=True, blank=True)
doi = models.CharField(max_length=255, null=True, blank=True)

class Meta:
db_table = "dokument"
Expand Down Expand Up @@ -560,7 +561,6 @@ class DokumentCast(ExportModelOperationsMixin("dokument_cast"), models.Model):
null=True,
related_name="casti_dokumentu",
)
doi = models.CharField(max_length=255, blank=True, null=True)

class Meta:
db_table = "dokument_cast"
Expand Down

0 comments on commit cc71058

Please sign in to comment.