(self, *args, **kwargs)
Overriding the save method in order to make sure that
        modified field is updated even if it is not given as
        a parameter to the update field argument.
Overriding the save method in order to make sure that
        modified field is updated even if it is not given as
        a parameter to the update field argument.
Overriding the save method in order to make sure that modified field is updated even if it is not given as a parameter to the update field argument .
def save(self, *args, **kwargs):
        """
        Overriding the save method in order to make sure that
        modified field is updated even if it is not given as
        a parameter to the update field argument.
        """
        update_fields = kwargs.get('update_fields', None)
        if update_fields:
            kwargs['update_fields'] = set(update_fields).union({'modified'})

        super().save(*args, **kwargs)
def save ( self , * args , * * kwargs ) : update_fields = kwargs . get ( 'update_fields' , None ) if update_fields : kwargs [ 'update_fields' ] = set ( update_fields ) . union ( { 'modified' } ) super ( ) . save ( * args , * * kwargs )