Skip to content

Commit

Permalink
fix sort in datalog feedere
Browse files Browse the repository at this point in the history
  • Loading branch information
tubleronchik committed Oct 17, 2024
1 parent 9d75025 commit 62b9b4f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions connectivity/src/feeders/datalog_feeder.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from connectivity.config.logging import LOGGING_CONFIG
from connectivity.utils.datalog_db import DatalogDB
from connectivity.utils.ipfs_db import IPFSDB
from ...constants import SDS011_MODEL
from ...constants import MOBILE_GPS

from ...constants import PING_MODEL
from .ifeeder import IFeeder
Expand Down Expand Up @@ -78,16 +78,16 @@ def _get_multihash(buf: set, db: object, endpoint: str = "/ip4/127.0.0.1/tcp/500
if m.public in payload:
payload[m.public]["measurements"].append(m.measurement)
else:
if m.model==SDS011_MODEL:
if m.model == MOBILE_GPS:
payload[m.public] = {
"model": m.model,
"geo": "{},{}".format(m.geo_lat, m.geo_lon),
"donated_by": m.donated_by,
"measurements": [m.measurement],
}
else:
payload[m.public] = {
"model": m.model,
"geo": "{},{}".format(m.geo_lat, m.geo_lon),
"donated_by": m.donated_by,
"measurements": [m.measurement],
}
Expand Down

0 comments on commit 62b9b4f

Please sign in to comment.