2👍
✅
Found solution here. There is self.model() inside Manager class:
class CurrentUserManager(models.Manager):
....
def get(self, *args, **kwargs):
try:
object = super(CurrentUserManager, self).get(*args, **kwargs)
except:
object = self.model(**kwargs)
return object
Source:stackexchange.com