django-oscar / django-oscar-api
Showing 1 of 2 files from the diff.

@@ -158,10 +158,12 @@
Loading
158 158
                        attribute_value.save()
159 159
                    else:
160 160
                        attribute_value.delete()
161 -
            # return a refreshed instance so we are sure all attributes are reloaded
162 -
            # from the database again when accessed. The behaviour of the AttributeConatainer
163 -
            # was changed in Oscar 3
164 -
            return instance._meta.model.objects.get(pk=instance.pk)
161 +
162 +
            # make sure all attributes are invalidated before accessing so they will reflect
163 +
            # the latest values from the database
164 +
            instance.attr._setup()
165 +
166 +
            return instance
165 167
166 168
167 169
class AdminCategorySerializer(BaseCategorySerializer):
Files Coverage
oscarapi 94.09%
Project Totals (41 files) 94.09%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading