Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __call__(self, ctx, req):
if IValueSet.providedBy(ctx):
if ctx.values and ctx.values[0].domainelement:
if 'icon' in ctx.values[0].domainelement.jsondatadict:
return svg.data_url(svg.icon(ctx.values[0].domainelement.jsondata['icon']))
if IDomainElement.providedBy(ctx):
if 'icon' in ctx.jsondatadict:
return svg.data_url(svg.icon(ctx.jsondata['icon']))
return super(GlottologMapMarker, self).__call__(ctx, req)