@@ -556,7 +556,7 @@ def save(self, *args, **kwargs): # noqa
556556 else :
557557 self .summary += "{} deployed {}" .format (self .build .owner , self .build .image )
558558 # if the config data changed, log the dict diff
559- elif self .config != old_config :
559+ if self .config != old_config :
560560 dict1 = self .config .values
561561 dict2 = old_config .values if old_config else {}
562562 diff = dict_diff (dict1 , dict2 )
@@ -573,14 +573,14 @@ def save(self, *args, **kwargs): # noqa
573573 self .summary += ' and '
574574 self .summary += "{} {}" .format (self .config .owner , changes )
575575 # if the limit changes, log the dict diff
576- elif self .config .limit != old_limit :
576+ if self .config .limit != old_limit :
577577 changes = []
578578 old_mem = old_limit .memory if old_limit else {}
579- diff = dict_diff (self .limit .memory , old_mem )
579+ diff = dict_diff (self .config . limit .memory , old_mem )
580580 if diff .get ('added' ) or diff .get ('changed' ) or diff .get ('deleted' ):
581581 changes .append ('memory' )
582582 old_cpu = old_limit .cpu if old_limit else {}
583- diff = dict_diff (self .limit .cpu , old_cpu )
583+ diff = dict_diff (self .config . limit .cpu , old_cpu )
584584 if diff .get ('added' ) or diff .get ('changed' ) or diff .get ('deleted' ):
585585 changes .append ('cpu' )
586586 if changes :
0 commit comments