You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Will propose a solution for both issues. The current date handling is managed in this template:
{%ifobject.start_date_written==object.end_date_written%} # GP: add check here that both dates are not none or catch this case above<date>{{ object.start_date_written }}</date>
{%elifobject.start_date_writtenandobject.end_date_written%}
<date
{%ifobject.start_start_date%}
from-iso="{{ object.start_start_date|date:'Y-m-d' }}"
{%endif%}
{%ifobject.end_date%}
to-iso="{{ object.end_date|date:'Y-m-d' }}"
{%endif%}
>{{ object.start_date_written }} – {{ object.end_date_written }}</date>
{%elifobject.start_date_written%}
<date
{%ifobject.start_start_date%}
notBefore-iso="{{ object.start_start_date|date:'Y-m-d' }}"
{%endif%}
{%ifobject.start_date%}
when-iso="{{ object.start_date|date:'Y-m-d' }}"
{%endif%}
>{{ object.start_date_written }}</date>
{%elifobject.end_date_written%}
<date
{%ifobject.end_date%}
when-iso="{{ object.end_date|date:'Y-m-d' }}"
{%endif%}
{%ifobject.end_end_date%}
notAfter-iso="{{ object.end_end_date|date:'Y-m-d' }}"
{%endif%}
>{{ object.end_date_written }}</date>
{%else%}
{%endif%}
I think we would need even more checks, for each individual date-section. To unifiy the beaviour, I would propose to return:
no date at all, if both start and end date are none
an empty date in each case where from-iso and to-iso is expected and only one of the two is None. I guess that this caused the incomplete exports
@martinantonmueller and @csae8092 - would this be the desired behaviour and if so, what should be the default value for the second case where a to-iso and from-iso is expected but only one of the two is None? Should it be simply "None"
PS: to be clear, in the second case, I suggest, of course, to keep the exisiting date and set the missing date (either from-iso or to-iso to None)
this is an incomplete export:
<date to-iso="1938-09-25">03.12.1918 – 25.09.1938</date>
from-iso
is missingcf. https://pmb.acdh.oeaw.ac.at/apis/entities/tei/institution/36687
The text was updated successfully, but these errors were encountered: