mirror of
https://github.com/inventree/InvenTree.git
synced 2026-09-02 19:08:47 +00:00
Fix conflict (for now)
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user