From 708fa5ce377f06555a1d4cb7fc46c9725bbae4fc Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Mon, 15 Jan 2024 17:10:21 +0100 Subject: [PATCH] fixed naming in query --- src/server/BreCal/impl/shipcalls.py | 2 +- src/server/BreCal/schemas/model.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/BreCal/impl/shipcalls.py b/src/server/BreCal/impl/shipcalls.py index a57d768..47fb9d0 100644 --- a/src/server/BreCal/impl/shipcalls.py +++ b/src/server/BreCal/impl/shipcalls.py @@ -20,7 +20,7 @@ def GetShipcalls(options): commands = pydapper.using(pooledConnection) query = ("SELECT id, ship_id, type, eta, voyage, etd, arrival_berth_id, departure_berth_id, tug_required, pilot_required, " "flags, pier_side, bunkering, replenishing_terminal, replenishing_lock, draft, tidal_window_from, tidal_window_to, rain_sensitive_cargo, recommended_tugs, " - "anchored, moored_lock, canceled, evaluation, evaluation_message, evaluation_time, evaluation_message_sent, created, modified FROM shipcall WHERE ((type = 1 OR type = 3) AND eta >= DATE(NOW() - INTERVAL %d DAY)" + "anchored, moored_lock, canceled, evaluation, evaluation_message, evaluation_time, evaluation_notifications_sent, created, modified FROM shipcall WHERE ((type = 1 OR type = 3) AND eta >= DATE(NOW() - INTERVAL %d DAY)" "OR (type = 2 AND etd >= DATE(NOW() - INTERVAL %d DAY))) " "ORDER BY eta") % (options["past_days"], options["past_days"]) diff --git a/src/server/BreCal/schemas/model.py b/src/server/BreCal/schemas/model.py index aec8866..1912796 100644 --- a/src/server/BreCal/schemas/model.py +++ b/src/server/BreCal/schemas/model.py @@ -127,7 +127,7 @@ class ShipcallSchema(Schema): evaluation = fields.Int(Required = False, allow_none=True) evaluation_message = fields.Str(allow_none=True, metadata={'Required':False}) # Solving: RemovedInMarshmallow4Warning: Passing field metadata as keyword arguments is deprecated. Use the explicit `metadata=...` argument instead. Additional metadata: {'Required': False} evaluation_time = fields.DateTime(Required = False, allow_none=True) - evaluation_message_sent = fields.Bool(Required = False, allow_none=True) + evaluation_notifications_sent = fields.Bool(Required = False, allow_none=True) participants = fields.List(fields.Nested(ParticipantAssignmentSchema)) created = fields.DateTime(Required = False, allow_none=True) modified = fields.DateTime(Required = False, allow_none=True) @@ -171,7 +171,7 @@ class Shipcall: evaluation: int evaluation_message: str evaluation_time: datetime - evaluation_message_sent: bool + evaluation_notifications_sent: bool created: datetime modified: datetime participants: List[Participant_Assignment] = field(default_factory=list)