~maas-committers/maas/trunk

« back to all changes in this revision

Viewing changes to src/maasserver/forms/script.py

  • Committer: MAAS Lander
  • Author(s): Lee Trager
  • Date: 2017-03-30 01:00:53 UTC
  • mfrom: (5856.4.11 stress_ng_tests)
  • Revision ID: maas_lander-20170330010053-ao4x5ftsqtzvke71
[r=mpontillo][bug=1673791][author=ltrager] Add stress-ng short cpu and memory tests and fix stress_ng_memory_long test.

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
                self, 'script_type',
84
84
                'Must be %d, test, testing, %d, commission, or commissioning.'
85
85
                % (SCRIPT_TYPE.TESTING, SCRIPT_TYPE.COMMISSIONING))
 
86
        # If a field wasn't passed in keep the old values when updating.
 
87
        if self.instance.id is not None:
 
88
            for field in self._meta.fields:
 
89
                if field not in self.data:
 
90
                    cleaned_data[field] = getattr(self.instance, field)
86
91
        return cleaned_data
87
92
 
88
93
    def is_valid(self):