2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2026-02-08 13:03:46 +00:00
This commit is contained in:
2026-01-30 20:55:57 +00:00
parent 34ed30ce55
commit e4c5009d0a

View File

@@ -607,14 +607,13 @@ class LoadingSurvex:
for sb in chunk:
got_obj, created = SurvexBlock.objects.get_or_create(
survexblock=sb.survexblock,
defaults={'survexblockblock': sb.survexblock} # Fields to set only if creating
_blockid=sb._blockid,
)
if created:
print(f" - {sb} Created", file=sys.stderr)
else:
# update the block if it changed
got_obj.block = sb.block
got_obj._blockid = sb._blockid
got_obj.save()
# print(f" - {sb} SAVED", file=sys.stderr)
print(f" - {len(chunk)} SBs saved to db", file=sys.stderr)