Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def bibrecord2source(req, src):
rec = src.bibtex()
rec['wals_url'] = req.resource_url(src)
return Source(rec.genre.value if rec.genre else 'misc', rec.id, **dict(rec.items()))