From 330fbb9b4bf5a97a7440aeeffa615a9d305009dd Mon Sep 17 00:00:00 2001 From: Elias Projahn Date: Mon, 20 Jul 2020 17:24:42 +0200 Subject: [PATCH] client: Don't always delete persons from the server --- client/lib/src/database.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/lib/src/database.dart b/client/lib/src/database.dart index ed3c044..0f687a8 100644 --- a/client/lib/src/database.dart +++ b/client/lib/src/database.dart @@ -178,7 +178,7 @@ class MusicusClientDatabase extends _$MusicusClientDatabase { /// willl be thrown and the instrument will NOT be deleted. Future deleteInstrument(int id, [bool sync = false]) async { if (sync) { - await client.deletePerson(id); + await client.deleteInstrument(id); } await (delete(instruments)..where((i) => i.id.equals(id))).go(); @@ -311,7 +311,7 @@ class MusicusClientDatabase extends _$MusicusClientDatabase { /// willl be thrown and the work will NOT be deleted. Future deleteWork(int id, [bool sync = false]) async { if (sync) { - await client.deletePerson(id); + await client.deleteWork(id); } // The parts and instrumentations will be deleted automatically due to @@ -357,7 +357,7 @@ class MusicusClientDatabase extends _$MusicusClientDatabase { /// willl be thrown and the ensemble will NOT be deleted. Future deleteEnsemble(int id, [bool sync = false]) async { if (sync) { - await client.deletePerson(id); + await client.deleteEnsemble(id); } await (delete(ensembles)..where((e) => e.id.equals(id))).go(); @@ -443,7 +443,7 @@ class MusicusClientDatabase extends _$MusicusClientDatabase { /// willl be thrown and the recording will NOT be deleted. Future deleteRecording(int id, [bool sync = false]) async { if (sync) { - await client.deletePerson(id); + await client.deleteRecording(id); } // This will also delete the performances due to their foreign key