added condition to unique_workshop_code logic