diff --git a/admin/views/fdd/rule.model.html b/admin/views/fdd/rule.model.html index e34da038..f02e8cd3 100644 --- a/admin/views/fdd/rule.model.html +++ b/admin/views/fdd/rule.model.html @@ -25,6 +25,7 @@ +
- @@ -66,6 +67,10 @@ + + + +
- diff --git a/myems-api/core/emailmessage.py b/myems-api/core/emailmessage.py index a8e1226b..7926fe0b 100644 --- a/myems-api/core/emailmessage.py +++ b/myems-api/core/emailmessage.py @@ -162,7 +162,9 @@ class EmailMessageItem: raise falcon.HTTPError(falcon.HTTP_500, title='API.DATABASE_ERROR', description=str(e)) try: - cursor.execute(" SELECT id FROM tbl_email_messages WHERE id = %s ", (id_,)) + cursor.execute(" SELECT id " + " FROM tbl_email_messages " + " WHERE id = %s ", (id_,)) row = cursor.fetchone() except Exception as e: if cursor: diff --git a/myems-api/core/rule.py b/myems-api/core/rule.py index d0a8dc00..3dd2ade7 100644 --- a/myems-api/core/rule.py +++ b/myems-api/core/rule.py @@ -75,7 +75,7 @@ class RuleCollection: len(str.strip(new_values['data']['category'])) == 0 or \ str.strip(new_values['data']['category']) not in \ ('SYSTEM', 'REALTIME', 'SPACE', 'METER', 'TENANT', 'STORE', 'SHOPFLOOR', 'EQUIPMENT', - 'COMBINEDEQUIPMENT'): + 'COMBINEDEQUIPMENT', 'VIRTUALMETER'): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_CATEGORY') @@ -270,7 +270,7 @@ class RuleItem: len(str.strip(new_values['data']['category'])) == 0 or \ str.strip(new_values['data']['category']) not in \ ('SYSTEM', 'REALTIME', 'SPACE', 'METER', 'TENANT', 'STORE', 'SHOPFLOOR', 'EQUIPMENT', - 'COMBINEDEQUIPMENT'): + 'COMBINEDEQUIPMENT', 'VIRTUALMETER'): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_CATEGORY')