fix mission import
This commit is contained in:
@@ -27,7 +27,7 @@ class MissionProfileResource(ModelResource):
|
|||||||
def before_import_row(self, row: dict[str, str | Any], **kwargs):
|
def before_import_row(self, row: dict[str, str | Any], **kwargs):
|
||||||
row["mtype"] = SafeText(row["mtype"].upper().strip())
|
row["mtype"] = SafeText(row["mtype"].upper().strip())
|
||||||
row["mnum"] = SafeText(row["mnum"].upper().strip())
|
row["mnum"] = SafeText(row["mnum"].upper().strip())
|
||||||
h, m, _ = SafeText(row["duration"].split(":"))
|
h, m, _ = row["duration"].split(":")
|
||||||
row["duration"] = timedelta(hours=float(h), minutes=float(m))
|
row["duration"] = timedelta(hours=float(h), minutes=float(m))
|
||||||
super().before_import_row(row, **kwargs)
|
super().before_import_row(row, **kwargs)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user