1. Simon Meers
  2. django-dbgettext

Commits

Simon Meers  committed 392f413

Use pk instead of id for get_path_identifier

  • Participants
  • Parent commits 0891401
  • Branches default

Comments (0)

Files changed (1)

File dbgettext/registry.py

View file
     parent = None
     
     def get_path_identifier(self, obj):
-        return '%s_%d' % (obj._meta.object_name, obj.id)
+        return '%s_%s' % (obj._meta.object_name, str(obj.pk))
 
 
 # Registration code based on django.contrib.admin.sites