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
as you can see the message model is related to the conversation model by a foreign key, however when I go to save a message I get a errored raised here:
def get_lookup_constraint(self, constraint_class, alias, targets, sources, lookups,
raw_value):
from django.db.models.sql.where import SubqueryConstraint, AND, OR
root_constraint = constraint_class()
assert len(targets) == len(sources)
if len(lookups) > 1:
raise exceptions.FieldError('Relation fields do not support nested lookups')
lookup_type = lookups[0]
I have two models:
as you can see the message model is related to the conversation model by a foreign key, however when I go to save a message I get a errored raised here:
The router gets this data on the create call:
and the router is set to handle it like so:
as you can see in the get_initial it takes the id and turns it into a obj to pass to the create which is when I hit the error.
I thought at first it was because of SelfPublish but this happens on any create call if I try and save with a foreign key...
Please please please help me cause I need to get this done.
The text was updated successfully, but these errors were encountered: