aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fietsboek/models/track.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/fietsboek/models/track.py b/fietsboek/models/track.py
index 58e9745..1b1c38a 100644
--- a/fietsboek/models/track.py
+++ b/fietsboek/models/track.py
@@ -275,7 +275,7 @@ class Track(Base):
def date(self, value):
if value.tzinfo is None:
LOGGER.debug('Non-aware datetime passed (track_id=%d, value=%s), assuming offset=0',
- self.id, value)
+ self.id or -1, value)
self.date_tz = 0
else:
self.date_tz = value.tzinfo.utcoffset(value).total_seconds() // 60
@@ -576,7 +576,7 @@ class TrackCache(Base):
def start_time(self, value):
if value.tzinfo is None:
LOGGER.debug('Non-aware datetime passed (cache_id=%d, value=%s), assuming offset=0',
- self.id, value)
+ self.id or -1, value)
self.start_time_tz = 0
else:
self.start_time_tz = value.tzinfo.utcoffset(value).total_seconds() // 60
@@ -599,7 +599,7 @@ class TrackCache(Base):
def end_time(self, value):
if value.tzinfo is None:
LOGGER.debug('Non-aware datetime passed (cache_id=%d, value=%s), assuming offset=0',
- self.id, value)
+ self.id or -1, value)
self.end_time_tz = 0
else:
self.end_time_tz = value.tzinfo.utcoffset(value).total_seconds() // 60