code: def clean_perms(self):
          
          logging.info('Cleaning faulty perms')
          sesh = self.get_session
          pvms = (
              sesh.query(ab_models.PermissionView)
              .filter(or_(
                  ab_models.PermissionView.permission == None,  # NOQA
                  ab_models.PermissionView.view_menu == None,  # NOQA
              ))
          )
          deleted_count = pvms.delete()
          sesh.commit()
          if deleted_count:
              logging.info('Deleted {} faulty permissions'.format(deleted_count))
docs: FAB leaves faulty permissions that need to be cleaned up