I wanted to provide unique ID for different categories of models in my db. So I've introduced a dummy model :
class GUUID(models.Model):
guuid = models.PositiveSmallIntegerField(_(u"Dummy GUUID"), default=1)
and in model that I want to have unique ID:
class Event(models.Model):
unique = models.IntegerField(blank=False, editable=False)
def save(self):
guuid = GUUID()
guuid.save()
self.unique = guuid.id
self.save()
But when saving my model I'm getting:
maximum recursion depth exceeded while calling a Python object
and 997 QUUID obects in db. Why is that happening ?