def _validate_operation(self): operations = set(self._get_operations()) if not operations.issubset(self.settings.get("allowed_operations")): raise errors.OperationError("Unsupported operation") elif len(operations) > self.settings.get("max_operations"): raise errors.OperationError("Too many operations")
def _validate_operation(self): operations = set(self._get_operations()) if not operations.issubset(set(ImageHandler.OPERATIONS)): raise errors.OperationError("Unsupported operation")