Skip to content

Commit

Permalink
check for case id column
Browse files Browse the repository at this point in the history
  • Loading branch information
LanaBot committed Aug 28, 2023
1 parent 3fc6a4f commit 4e65ff4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kairos/services/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ def validate_and_reverse_columns_definition(columns_definition):

columns_definition_reverse = {v: k for k, v in columns_definition.items() if v in [COLUMN_TYPE.CASE_ID,COLUMN_TYPE.ACTIVITY,COLUMN_TYPE.TIMESTAMP,COLUMN_TYPE.START_TIMESTAMP,COLUMN_TYPE.END_TIMESTAMP,COLUMN_TYPE.RESOURCE]}

if not columns_definition_reverse.get(COLUMN_TYPE.CASE_ID):
raise Exception('The log must include a CASE_ID column.')

if not columns_definition_reverse.get(COLUMN_TYPE.ACTIVITY):
raise Exception('The log must include an ACTIVITY column.')

Expand Down

0 comments on commit 4e65ff4

Please sign in to comment.