Commit c74efa2b by Dudás Ádám

storage: fix parameter name

parent 12846245
...@@ -249,9 +249,9 @@ class DiskActivity(ActivityModel): ...@@ -249,9 +249,9 @@ class DiskActivity(ActivityModel):
verbose_name=_('disk')) verbose_name=_('disk'))
@classmethod @classmethod
def create(cls, code_suffix, instance, task_uuid=None, user=None): def create(cls, code_suffix, disk, task_uuid=None, user=None):
act = cls(activity_code='storage.Disk.' + code_suffix, act = cls(activity_code='storage.Disk.' + code_suffix,
instance=instance, parent=None, started=timezone.now(), disk=disk, parent=None, started=timezone.now(),
task_uuid=task_uuid, user=user) task_uuid=task_uuid, user=user)
act.save() act.save()
return act return act
...@@ -259,7 +259,7 @@ class DiskActivity(ActivityModel): ...@@ -259,7 +259,7 @@ class DiskActivity(ActivityModel):
def create_sub(self, code_suffix, task_uuid=None): def create_sub(self, code_suffix, task_uuid=None):
act = DiskActivity( act = DiskActivity(
activity_code=self.activity_code + '.' + code_suffix, activity_code=self.activity_code + '.' + code_suffix,
instance=self.instance, parent=self, started=timezone.now(), disk=self.disk, parent=self, started=timezone.now(),
task_uuid=task_uuid, user=self.user) task_uuid=task_uuid, user=self.user)
act.save() act.save()
return act return act
...@@ -271,6 +271,6 @@ class DiskActivity(ActivityModel): ...@@ -271,6 +271,6 @@ class DiskActivity(ActivityModel):
@contextmanager @contextmanager
def disk_activity(code_suffix, instance, task_uuid=None, user=None): def disk_activity(code_suffix, disk, task_uuid=None, user=None):
act = DiskActivity.create(code_suffix, instance, task_uuid, user) act = DiskActivity.create(code_suffix, disk, task_uuid, user)
return activitycontextimpl(act) return activitycontextimpl(act)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment