Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion modelcluster/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def clear(self):
"""
self.set([])

def set(self, objs, bulk=True, clear=False):
def set_base(self, objs, bulk=True, clear=False, through_defaults=None, raw=False):
# cast objs to a list so that:
# 1) we can call len() on it (which we can't do on, say, a queryset)
# 2) if we need to sort it, we can do so without mutating the original
Expand All @@ -472,6 +472,9 @@ def set(self, objs, bulk=True, clear=False):

cluster_related_objects[relation_name] = objs

def set(self, objs, *, clear=False, through_defaults=None):
self.set_base(objs, clear=clear, through_defaults=through_defaults)

def remove(self, *items_to_remove):
"""
Remove the passed items from the stored object set, but do not commit the change
Expand Down
1 change: 1 addition & 0 deletions modelcluster/queryset.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,3 +556,4 @@ def __len__(self):
return len(self.results)

ordered = True # results are returned in a consistent order
totally_ordered = True
Loading