Opened 10 years ago

Closed 10 years ago

#958 closed defect (duplicate)

[patch] Allow non-int Primary Keys in ForeignKey

Reported by: Boffbowsh Owned by: adrian
Component: Metasystem Version:
Severity: normal Keywords:
Cc: paul.bowsher@… Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

{{{Index: /usr/local/django_src/django/core/meta/fields.py
===================================================================
--- /usr/local/django_src/django/core/meta/fields.py (revision 1476)
+++ /usr/local/django_src/django/core/meta/fields.py (working copy)
@@ -722,7 +722,7 @@

if value == or value == None:

return None

else:

  • return int(value)

+ return value

def flatten_data(self, follow, obj = None):

if not obj:}}}

Change History (2)

comment:1 Changed 10 years ago by Boffbowsh

Index: /usr/local/django_src/django/core/meta/fields.py
===================================================================
--- /usr/local/django_src/django/core/meta/fields.py    (revision 1476)
+++ /usr/local/django_src/django/core/meta/fields.py    (working copy)
@@ -722,7 +722,7 @@
         if value == '' or value == None:
            return None
         else:
-           return int(value)
+           return value
 
     def flatten_data(self, follow, obj = None):
         if not obj:

fs, fixed formatting

comment:2 Changed 10 years ago by L.Plant.98@…

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #927

Note: See TracTickets for help on using tickets.
Back to Top