Fix field type to audit_type
There's a number of places where a field of an object is named "type", which isn't good thing. Actually type is keyword in python, so wherever I found type used in models/api/object/test, I have fixed it to audit_type in the audit files Change-Id: Iea6bd3acb0b2af2a833b3916701aad88f6064bba Closes-Bug: #1533392
This commit is contained in:
@@ -330,7 +330,7 @@ class Connection(api.BaseConnection):
|
||||
if filters is None:
|
||||
filters = {}
|
||||
|
||||
plain_fields = ['uuid', 'type', 'state', 'audit_template_id']
|
||||
plain_fields = ['uuid', 'audit_type', 'state', 'audit_template_id']
|
||||
join_fieldmap = {
|
||||
'audit_template_uuid': ("uuid", models.AuditTemplate),
|
||||
'audit_template_name': ("name", models.AuditTemplate),
|
||||
|
||||
@@ -171,7 +171,7 @@ class Audit(Base):
|
||||
)
|
||||
id = Column(Integer, primary_key=True)
|
||||
uuid = Column(String(36))
|
||||
type = Column(String(20))
|
||||
audit_type = Column(String(20))
|
||||
state = Column(String(20), nullable=True)
|
||||
deadline = Column(DateTime, nullable=True)
|
||||
audit_template_id = Column(Integer, ForeignKey('audit_templates.id'),
|
||||
|
||||
Reference in New Issue
Block a user