Skip to content

Commit

Permalink
Merge pull request #39 from arthur-schnitzler/main
Browse files Browse the repository at this point in the history
no relation with yourself
  • Loading branch information
csae8092 authored Jan 13, 2024
2 parents 4b4a683 + 0385951 commit 9c561aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion apis_core/apis_relations/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from crispy_forms.helper import FormHelper
from django import forms

from apis_core.apis_entities.models import Place
from apis_core.apis_labels.models import Label
from apis_core.helper_functions import DateParser

Expand Down
2 changes: 2 additions & 0 deletions apis_core/apis_relations/forms2.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ def save(self, site_instance, instance=None, commit=True):
x = self.relation_form.objects.get(pk=instance)
else:
x = self.relation_form()
if f"{site_instance.id}" == f'{cd["target"]}':
return x
x.relation_type_id = cd["relation_type"]
x.start_date_written = cd["start_date_written"]
x.end_date_written = cd["end_date_written"]
Expand Down

0 comments on commit 9c561aa

Please sign in to comment.