Opened 20 years ago
Closed 20 years ago
#958 closed defect (duplicate)
[patch] Allow non-int Primary Keys in ForeignKey
| Reported by: | Boffbowsh | Owned by: | Adrian Holovaty |
|---|---|---|---|
| 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: | no | UI/UX: | no |
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:}}}
Note:
See TracTickets
for help on using tickets.
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