mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-22 15:56:14 +00:00
Metadata fix (#4725)
* Add 'clean' method to MetadataMixin class - Ensure that the "metadata" is a valid dict object * Add "overwrite" option for set_metadata method * Update unit tests * full_clean -> clean * Cleanup * Fix for MetadataMixin * Updates for unit tests * Test
This commit is contained in:
1 parent
c45e66935a
commit
9920c3fd9c
11 files changed
+36
-15
No files matched your search
@@ -135,7 +135,6 @@ class LabelTest(InvenTreeAPITestCase):
|
||||
"""Unit tests for the metadata field."""
|
||||
for model in [StockItemLabel, StockLocationLabel, PartLabel]:
|
||||
p = model.objects.first()
|
||||
self.assertIsNone(p.metadata)
|
||||
|
||||
self.assertIsNone(p.get_metadata('test'))
|
||||
self.assertEqual(p.get_metadata('test', backup_value=123), 123)
|
||||
|
||||
Reference in new issue
Block a user