Skip to content

Commit

Permalink
Fix issue #274 (#275)
Browse files Browse the repository at this point in the history
Use `set` method instead of `__set__` on a
`ManyToManyField` to ensure compatibility with
Django 2.0 and higher.
  • Loading branch information
MKolman authored and albertyw committed Apr 3, 2018
1 parent 01bb065 commit b5e6aae
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions silk/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@ def finalise(self):
)
profile = models.Profile.objects.create(**profile)
if profile_query_models:
profile.queries = profile_query_models
profile.save()
profile.queries.set(profile_query_models)
self._record_meta_profiling()

def register_silk_query(self, *args):
Expand Down

0 comments on commit b5e6aae

Please sign in to comment.