Skip to content

Commit e7c8943

Browse files
committed
fix: improve error handling when make_fetch referential integrity fails
1 parent 5f37f83 commit e7c8943

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

datajoint/autopopulate.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -412,11 +412,10 @@ def _populate1(
412412
!= deepdiff.DeepHash(fetched_data, ignore_iterable_order=False)[
413413
fetched_data
414414
]
415-
): # rollback due to referential integrity fail
416-
self.connection.cancel_transaction()
417-
logger.warning(
418-
f"Referential integrity failed for {key} -> {self.target.full_table_name}")
419-
return False
415+
): # raise error if fetched data has changed
416+
raise DataJointError(
417+
"Referential integrity failed - the `make_fetch` data has changed."
418+
)
420419
gen.send(computed_result) # insert
421420

422421
except (KeyboardInterrupt, SystemExit, Exception) as error:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy