def validate_agents(agents, userID): if not Validator.validateAgentZip(agents, userID): error_msg = "Should upload a valid .zip with agents" raise forms.ValidationError(error_msg) return agents