forked from mirrors/bookwyrm
Removes duplicate atomic block
This commit is contained in:
parent
dedcbda2d8
commit
5fcdc284ce
1 changed files with 25 additions and 26 deletions
|
@ -208,7 +208,6 @@ def set_related_field(
|
||||||
model = apps.get_model(f"bookwyrm.{model_name}", require_ready=True)
|
model = apps.get_model(f"bookwyrm.{model_name}", require_ready=True)
|
||||||
origin_model = apps.get_model(f"bookwyrm.{origin_model_name}", require_ready=True)
|
origin_model = apps.get_model(f"bookwyrm.{origin_model_name}", require_ready=True)
|
||||||
|
|
||||||
with transaction.atomic():
|
|
||||||
if isinstance(data, str):
|
if isinstance(data, str):
|
||||||
existing = model.find_existing_by_remote_id(data)
|
existing = model.find_existing_by_remote_id(data)
|
||||||
if existing:
|
if existing:
|
||||||
|
|
Loading…
Reference in a new issue