diff --git a/silk/collector.py b/silk/collector.py index 9ef1ffa5..d50edd53 100644 --- a/silk/collector.py +++ b/silk/collector.py @@ -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):