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
This is strange - if I import my own app's model (which has an FK to user using the string reference method) BEFORE importing LazyUser, then rel.to returns a class.
The call to
rel.to
on LazyUser user field returns a string "auth.User", not the class.This results in
AttributeError: 'str' object has no attribute '_meta'
when I try to doLazyUser.objects.create_lazy_user()
replacing the definition of the User foriegnkey
with
where
fixes the issue for me. I'm wondering why this is happening at all though?? Usually rel.to does in fact return a class.
The text was updated successfully, but these errors were encountered: