From 6fbceb0f121d760f84cabeb9e610b3480acd75d2 Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Fri, 29 Jan 2016 14:40:41 +0000 Subject: bitbake: toaster: models Invalidate ToasterTables cache when a m2m field changes Whem a m2m field changes we need to clear the ToasterTables cache as this can affect the state of items in ToasterTables. For example the CustomImagePackages being added or removed from a custom image recipe. (Bitbake rev: c9d7b68ee0186a71e8e75a5d87122a0328001515) Signed-off-by: Michael Wood Signed-off-by: brian avery Signed-off-by: Richard Purdie --- bitbake/lib/toaster/orm/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index cb3c385c60..e9285d6438 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -1584,3 +1584,4 @@ def invalidate_cache(**kwargs): django.db.models.signals.post_save.connect(invalidate_cache) django.db.models.signals.post_delete.connect(invalidate_cache) +django.db.models.signals.m2m_changed.connect(invalidate_cache) -- cgit v1.2.3-54-g00ecf