saxix / django-adminactions
Showing 1 of 1 files from the diff.

@@ -222,7 +222,13 @@
Loading
222 222
                    old_value = getattr(record, field_name)
223 223
                    setattr(record, field_name, value_or_func(old_value))
224 224
                else:
225 -
                    setattr(record, field_name, value_or_func)
225 +
                    changed_attr = getattr(record, field_name, None)
226 +
227 +
                    if changed_attr.__class__.__name__ == 'ManyRelatedManager':
228 +
                            changed_attr.set(value_or_func)
229 +
                    else:
230 +
                        setattr(record, field_name, value_or_func)
231 +
226 232
            if clean:
227 233
                record.clean()
228 234
            record.save()
Files Coverage
src/adminactions 84.72%
Project Totals (23 files) 84.72%
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