Skip to content

Commit 2b8aa07

Browse files
author
Matthew Fisher
committed
fix(controller): set default config owner to request.user
1 parent 3e2cc8b commit 2b8aa07

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

controller/api/views.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,9 @@ def get_object(self, *args, **kwargs):
304304
def pre_save(self, config):
305305
"""merge the old config with the new"""
306306
previous_config = config.app.config_set.latest()
307-
config.owner = previous_config.owner
307+
config.owner = self.request.user
308308
if previous_config:
309+
config.owner = previous_config.owner
309310
for attr in ['cpu', 'memory', 'tags', 'values']:
310311
# Guard against migrations from older apps without fixes to
311312
# JSONField encoding.

0 commit comments

Comments
 (0)