From 20b7b794d84a3c1e49ced6ffb5e697a07900b280 Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 25 Apr 2023 14:00:19 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BF=AE=E6=94=B9=20m2m=20field?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/db/fields.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/apps/common/db/fields.py b/apps/common/db/fields.py index 978fcd865..9a43061e5 100644 --- a/apps/common/db/fields.py +++ b/apps/common/db/fields.py @@ -289,16 +289,10 @@ class RelatedManager: self.field = field self.value = None - def _is_value_stale(self, current_value): - return self.value != current_value - def set(self, value): self.value = value self.instance.__dict__[self.field.name] = value - def serialize(self): - return self.value - def _get_queryset(self): model = apps.get_model(self.field.to) value = self.value