From d80cefd41677bbfe49588ce6826b4128fa010948 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Sat, 22 Apr 2023 19:12:12 +0200 Subject: [PATCH] Add a management command to merge works --- bookwyrm/management/commands/merge_works.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 bookwyrm/management/commands/merge_works.py diff --git a/bookwyrm/management/commands/merge_works.py b/bookwyrm/management/commands/merge_works.py new file mode 100644 index 000000000..619d0509a --- /dev/null +++ b/bookwyrm/management/commands/merge_works.py @@ -0,0 +1,12 @@ +""" PROCEED WITH CAUTION: uses deduplication fields to permanently +merge work data objects """ +from bookwyrm import models +from bookwyrm.management.merge_command import MergeCommand + + +class Command(MergeCommand): + """merges two works by ID""" + + help = "merges specified works into one" + + MODEL = models.Work