Tested it with "pwncollege/intro-to-cybersecurity-dojo/" (notice the last / at the end), and it allowed me to create a new dojo with the same repo, bypassing this check:
if Dojos.query.filter_by(repository=repository).first():
raise AssertionError("This repository already exists as a dojo")