diff --git a/apis_core/apis_relations/forms2.py b/apis_core/apis_relations/forms2.py index 35b97830a..1717e7188 100644 --- a/apis_core/apis_relations/forms2.py +++ b/apis_core/apis_relations/forms2.py @@ -145,7 +145,14 @@ def load_subj_obj_prop( self.fields["property"].choices = [property_initial_value] other_entity_initial_value = ( - str(Uri.objects.get(root_object=entity_instance_other)), + str( + Uri.objects.filter( + root_object=entity_instance_other, + uri__startswith=getattr( + settings, "APIS_BASE_URI", "http://apis.info/" + ), + ).first() + ), f"db {str(entity_instance_other)}", ) self.fields["other_entity"].initial = other_entity_initial_value