From 47f1b98d4c4489ea5f82a093a2625a61a01f49b4 Mon Sep 17 00:00:00 2001 From: alhendrickson <159636032+alhendrickson@users.noreply.github.com.> Date: Wed, 21 Jan 2026 10:18:49 +0000 Subject: [PATCH] fix(medcat-trainer): Pass kwargs to ModelPack.save to stay consistent --- medcat-trainer/webapp/api/api/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/medcat-trainer/webapp/api/api/models.py b/medcat-trainer/webapp/api/api/models.py index 08ea6c877..eee883c31 100644 --- a/medcat-trainer/webapp/api/api/models.py +++ b/medcat-trainer/webapp/api/api/models.py @@ -137,7 +137,7 @@ def save(self, *args, skip_load=False, **kwargs): else: # For new objects, just update the FK fields without full save # Fixes psycopg.errors.UniqueViolation: duplicate key value violates unique constraint "api_modelpack_pkey" - super().save(update_fields=['concept_db', 'vocab']) + super().save(*args, update_fields=['concept_db', 'vocab'], **kwargs) def __str__(self): return self.name