Skip to content

Commit e03b294

Browse files
fix unique_constraint error (#40)
1 parent 69aeaa8 commit e03b294

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sensorsafrica/management/commands/cache_lastactive_nodes_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ def handle(self, *args, **options):
2121
LastActiveNodes.objects.update_or_create(
2222
node=Node(pk=data["sensor__node"]),
2323
location=SensorLocation(pk=data["location"]),
24-
last_data_received_at=data["timestamp"],
24+
defaults={"last_data_received_at": data["timestamp"]},
2525
)

0 commit comments

Comments
 (0)