Fixes https://pagure.io/pagure/issue/1890
I think there's two spaces before the if statement. Doesn't hurt anything, I think, but it made my eye twitch.
if
Good catch :)
rebased
Is this valid syntax? I think you need an else clause in there.
else
Thanks, your question made me double check and realized that my if repo.namespace was in fact at the wrong place. The syntax is fine, jinja will just put '' for me there, but it only works if placed at the right location :)
if repo.namespace
''
I hotfix pagure.io for this fix so we can give it a better exposure :)
Ah okay. I expected the syntax to be like x = 'a' if True is False else 'b'.
x = 'a' if True is False else 'b'
This looks good, merge away. I wonder if fiddling with the model object to make sure if the namespace doesn't exist repo.namespace returns the empty string would fix a lot of these edge cases.
repo.namespace
Thanks for reviewing it :)
Pull-Request has been merged by pingou
Fixes https://pagure.io/pagure/issue/1890