-
Notifications
You must be signed in to change notification settings - Fork 38
[MDS-5758] Dam History #3463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MDS-5758] Dam History #3463
Conversation
@@ -15,14 +15,14 @@ class ConsequenceClassification(Enum): | |||
NRT = 'NRT' | |||
|
|||
def __str__(self): | |||
return self.value | |||
return self.value[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was interesting! I kept getting errors in the bit that converted these values to strings. As it turned out, self.value
actually returned a Tuple. So it looked like [ValueIWant,]
.
'operating_status': fields.String(enum=OperatingStatus, attribute='operating_status.name'), | ||
'consequence_classification': fields.String(enum=ConsequenceClassification, attribute='consequence_classification.name'), | ||
'operating_status': fields.String, | ||
'consequence_classification': fields.String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why, but these enums worked perfectly fine when using DAM_MODEL
but exploded the swagger when it was cloned into DAM_HISTORY_MODEL
. Turned them into fields.String
on the base model on the off-chance that another enum attribute is added at some point or someone goes to use it as a reference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. Should work fine though in this model context.
|
|
|
|
changeset: IDiffColumn[]; | ||
} | ||
|
||
/** | ||
* Used to map the diff titles and values to a more user-friendly format | ||
* Supply *one of* hash, tranform, data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Autobots, TRANFORM! 😆
|
||
const createRequestHeader = REQUEST_HEADER.createRequestHeader; | ||
|
||
const damSlice = createAppSlice({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Loving the slice format!
@@ -478,6 +479,30 @@ class AuditMixin(object): | |||
update_timestamp = db.Column( | |||
db.DateTime, nullable=False, default=datetime.utcnow, onupdate=datetime.utcnow) | |||
|
|||
class HistoryMixin(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nice, good idea!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice Dam work! 🦫
Objective
MDS-5758
Why are you making this change? Provide a short explanation and/or screenshots


The modal:
All of the fields: