diff options
author | Michael Wood <michael.g.wood@intel.com> | 2016-01-29 14:40:41 +0000 |
---|---|---|
committer | brian avery <avery.brian@gmail.com> | 2016-02-08 12:48:14 -0800 |
commit | c9d7b68ee0186a71e8e75a5d87122a0328001515 (patch) | |
tree | de6b537a8a8db6dc290447c46ec48320f0c26912 /lib/toaster/orm | |
parent | 119569d83c3fb1d1bd162624819b3f9c63a791c4 (diff) | |
download | bitbake-c9d7b68ee0186a71e8e75a5d87122a0328001515.tar.gz |
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.
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Diffstat (limited to 'lib/toaster/orm')
-rw-r--r-- | lib/toaster/orm/models.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py index cb3c385c6..e9285d643 100644 --- a/lib/toaster/orm/models.py +++ b/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) |