From df9a69d0ffdafca8acb8d27047f5df85c04c98aa Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Fri, 1 May 2026 19:03:47 +0200 Subject: [PATCH] Create a new id for when setting new logs --- lib/providers/gym_log_notifier.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/providers/gym_log_notifier.dart b/lib/providers/gym_log_notifier.dart index 6366c005d..0368a9373 100644 --- a/lib/providers/gym_log_notifier.dart +++ b/lib/providers/gym_log_notifier.dart @@ -18,6 +18,7 @@ import 'package:clock/clock.dart'; import 'package:logging/logging.dart'; +import 'package:powersync/powersync.dart' show uuid; import 'package:riverpod_annotation/riverpod_annotation.dart'; import 'package:wger/models/workouts/log.dart'; import 'package:wger/models/workouts/repetition_unit.dart'; @@ -36,7 +37,8 @@ class GymLogNotifier extends _$GymLogNotifier { } void setLog(Log log) { - final newLog = log.copyWith(id: null, date: clock.now()); + // Mint a fresh uuid explicitly + final newLog = log.copyWith(id: uuid.v7(), date: clock.now()); state = newLog; }