code: def revert(self, request, queryset):
          
          if queryset.count() != 1:
              self.message_user(request, _("Please select a single configuration to revert to."))
              return
  
          target = queryset[0]
          target.id = None
          self.save_model(request, target, None, False)
          self.message_user(request, _("Reverted configuration."))
  
          return HttpResponseRedirect(
              reverse(
                  'admin:{}_{}_change'.format(
                      self.model._meta.app_label,
                      self.model._meta.model_name,
                  ),
                  args=(target.id,),
              )
          )
docs: Admin action to revert a configuration back to the selected value