fixed issue 440, reference to primary keys
This commit is contained in:
1 parent
fee2c667b3
commit
9920b7592d
2 files changed
+2
-2
No files matched your search
@@ -1 +1 @@
|
||||
Version 2.3.0 (2012-12-05 11:22:29) rc1
|
||||
Version 2.3.0 (2012-12-05 11:34:39) rc1
|
||||
+1
-1
@@ -8545,7 +8545,7 @@ class Field(Expression):
|
||||
if not isinstance(fieldname,str) or hasattr(Table,fieldname) or \
|
||||
fieldname[0] == '_' or REGEX_PYTHON_KEYWORDS.match(fieldname):
|
||||
raise SyntaxError('Field: invalid field name: %s' % fieldname)
|
||||
self.type = type if not isinstance(type, Table) else 'reference %s' % type
|
||||
self.type = type if not isinstance(type, (Table,Field)) else 'reference %s' % type
|
||||
self.length = length if not length is None else DEFAULTLENGTH.get(self.type,512)
|
||||
self.default = default if default!=DEFAULT else (update or None)
|
||||
self.required = required # is this field required
|
||||
|
||||
Reference in new issue
Block a user