Skip to content

Commit

Permalink
Update default dates on data quality rules (#4538)
Browse files Browse the repository at this point in the history
* new default dates for dq rules

* make year dynamic

---------

Co-authored-by: Katherine Fleming <[email protected]>
  • Loading branch information
nllong and kflemin authored Feb 22, 2024
1 parent bcbec02 commit a43434d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions seed/models/data_quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class Rule(models.Model):
'data_type': TYPE_DATE,
'rule_type': RULE_TYPE_DEFAULT,
'min': 18890101,
'max': 20201231,
'max': datetime.now().strftime("%Y1231"),
'severity': SEVERITY_ERROR,
'condition': RULE_RANGE,
}, {
Expand Down Expand Up @@ -232,7 +232,7 @@ class Rule(models.Model):
'data_type': TYPE_DATE,
'rule_type': RULE_TYPE_DEFAULT,
'min': 18890101,
'max': 20201231,
'max': datetime.now().strftime("%Y1231"),
'severity': SEVERITY_ERROR,
'condition': RULE_RANGE,
}, {
Expand All @@ -241,7 +241,7 @@ class Rule(models.Model):
'data_type': TYPE_DATE,
'rule_type': RULE_TYPE_DEFAULT,
'min': 18890101,
'max': 20201231,
'max': datetime.now().strftime("%Y1231"),
'severity': SEVERITY_ERROR,
'condition': RULE_RANGE,
}, {
Expand Down Expand Up @@ -308,7 +308,7 @@ class Rule(models.Model):
'data_type': TYPE_YEAR,
'rule_type': RULE_TYPE_DEFAULT,
'min': 1700,
'max': 2019,
'max': str(datetime.now().year),
'severity': SEVERITY_ERROR,
'condition': RULE_RANGE,
}, {
Expand All @@ -317,7 +317,7 @@ class Rule(models.Model):
'data_type': TYPE_DATE,
'rule_type': RULE_TYPE_DEFAULT,
'min': 18890101,
'max': 20201231,
'max': datetime.now().strftime("%Y1231"),
'severity': SEVERITY_ERROR,
'condition': RULE_RANGE,
}
Expand Down

0 comments on commit a43434d

Please sign in to comment.