Fix conflict (for now)

This commit is contained in:
Oliver Walters
2026-05-21 09:27:08 +00:00
parent c7d11dc939
commit 9e8764d28a
+9 -8
View File
@@ -664,15 +664,16 @@ class InvenTreeNoteMixin(InvenTreePermissionCheckMixin):
'common.Note', content_type_field='model_type', object_id_field='model_id' 'common.Note', content_type_field='model_type', object_id_field='model_id'
) )
@property # TODO: Un-comment this once the InvenTreeNotesMixin class is removed
def notes(self) -> QuerySet: # @property
"""Return a queryset containing all notes for this model.""" # def notes(self) -> QuerySet:
# Check the query cache for pre-fetched parameters # """Return a queryset containing all notes for this model."""
if cache := getattr(self, '_prefetched_objects_cache', None): # # Check the query cache for pre-fetched parameters
if 'notes_list' in cache: # if cache := getattr(self, '_prefetched_objects_cache', None):
return cache['notes_list'] # if 'notes_list' in cache:
# return cache['notes_list']
return self.notes_list.all() # return self.notes_list.all()
def delete(self, *args, **kwargs): def delete(self, *args, **kwargs):
"""Handle the deletion of a model instance. """Handle the deletion of a model instance.