Field policy bug fix
diff --git a/plyxproto/model.py b/plyxproto/model.py
index 9cbdccc..e2b0bf8 100644
--- a/plyxproto/model.py
+++ b/plyxproto/model.py
@@ -81,7 +81,7 @@
visitor.visit_LinkDefinition(self)
class FieldDefinition(SourceElement):
- def __init__(self, field_modifier, ftype, name, fieldId, fieldDirective, linespan=None, lexspan=None, p=None):
+ def __init__(self, field_modifier, ftype, name, policy, fieldId, fieldDirective, linespan=None, lexspan=None, p=None):
super(FieldDefinition, self).__init__(linespan=linespan, lexspan=lexspan, p=p)
self._fields += ['field_modifier', 'ftype', 'name', 'fieldId', 'policy', 'fieldDirective']
self.name = name
@@ -91,8 +91,8 @@
self.ftype = ftype
Base.p(self.ftype, self)
self.fieldId = fieldId
- Base.p(self.policy, self)
self.policy = policy
+ Base.p(self.policy, self)
Base.p(self.fieldId, self)
self.fieldDirective = fieldDirective