1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Fixed #25129 -- Made model instance defaults work with migrations (refs #24919).

This commit is contained in:
Tim Graham
2015-07-16 08:00:29 -04:00
parent 04e69598de
commit b60375d4bb
5 changed files with 9 additions and 5 deletions

View File

@@ -13,7 +13,7 @@ class R(models.Model):
def get_default_r():
return R.objects.get_or_create(is_default=True)[0]
return R.objects.get_or_create(is_default=True)[0].pk
class S(models.Model):