Skip to content

Commit 960e6e2

Browse files
committed
Merge branch 'timestamp_proposal' of https://github.com/DataIntegrationGroup/NMSampleLocations into timestamp_proposal
2 parents 2e33f83 + f011226 commit 960e6e2

3 files changed

Lines changed: 3 additions & 9 deletions

File tree

schemas/location.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,7 @@ def populate_fields(cls, data: Any) -> Any:
155155
data_dict["properties"]["elevation"] = convert_m_to_ft(elevation_m)
156156
data_dict["properties"]["elevation_method"] = data_dict.get("elevation_method")
157157
# populate AMPAPI date fields
158-
data_dict["properties"]["nma_date_created"] = data_dict.get(
159-
"nma_date_created"
160-
)
158+
data_dict["properties"]["nma_date_created"] = data_dict.get("nma_date_created")
161159
data_dict["properties"]["nma_site_date"] = data_dict.get("nma_site_date")
162160

163161
# populate UTM coordinates

tests/features/steps/post_migration_legacy_data.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,7 @@ def step_when_filter_locations(context: Context, start_date: str, end_date: str)
195195

196196
locations = (
197197
session.query(Location)
198-
.filter(
199-
Location.nma_site_date >= start, Location.nma_site_date <= end
200-
)
198+
.filter(Location.nma_site_date >= start, Location.nma_site_date <= end)
201199
.all()
202200
)
203201

transfers/util.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,7 @@ def make_location(row: pd.Series, elevations: dict) -> tuple:
253253

254254
nma_site_date = None
255255
if row.SiteDate:
256-
nma_site_date = datetime.strptime(
257-
row.SiteDate, "%Y-%m-%d %H:%M:%S.%f"
258-
).date()
256+
nma_site_date = datetime.strptime(row.SiteDate, "%Y-%m-%d %H:%M:%S.%f").date()
259257

260258
location = Location(
261259
nma_pk_location=row.LocationId,

0 commit comments

Comments
 (0)