Skip to content

Commit

Permalink
Fix(userworkers): timestamp can only be int
Browse files Browse the repository at this point in the history
  • Loading branch information
TimVosch committed Nov 4, 2023
1 parent c4f8b36 commit 71664c8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions services/fission-user-workers/service/python/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ def __init__(self,
longitude: Optional[float] = None,
altitude: Optional[float] = None,
properties: Optional[Dict[str, Any]] = None):
self.timestamp = timestamp
self.sensor_external_id = sensor_external_id
self.value = value
self.observed_property = observed_property
self.unit_of_measurement = unit_of_measurement
self.latitude = latitude
self.longitude = longitude
self.altitude = altitude
self.timestamp = int(timestamp)
self.sensor_external_id = str(sensor_external_id)
self.value = float(value)
self.observed_property = str(observed_property)
self.unit_of_measurement = str(unit_of_measurement)
self.latitude = float(latitude) if latitude else None
self.longitude = float(longitude) if longitude else None
self.altitude = float(altitude) if altitude else None
self.properties = properties if properties else {}

def json_dict(self):
Expand Down

0 comments on commit 71664c8

Please sign in to comment.