summaryrefslogtreecommitdiff
path: root/jfr_playoff/generator.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2019-12-30 00:06:11 +0100
committeremkael <emkael@tlen.pl>2019-12-30 00:06:11 +0100
commitc904ec2a826f1a55adff51d8db90f224008ca350 (patch)
tree23dc8703544119c2f8e5faee7ef5bf366ac76181 /jfr_playoff/generator.py
parent3d06a19e83334356da988dcf866655f98b06ee42 (diff)
Support for absolute URLs for team flags
Diffstat (limited to 'jfr_playoff/generator.py')
-rw-r--r--jfr_playoff/generator.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/jfr_playoff/generator.py b/jfr_playoff/generator.py
index 5411e0e..7d108d2 100644
--- a/jfr_playoff/generator.py
+++ b/jfr_playoff/generator.py
@@ -1,4 +1,5 @@
from datetime import datetime
+import urlparse
from jfr_playoff.dto import coalesce
from jfr_playoff.template import PlayoffTemplate
@@ -435,4 +436,11 @@ class PlayoffGenerator(object):
def get_flag(self, team):
flag = self.data.get_team_image(team)
- return '' if flag is None else self.p_temp.get('LEADERBOARD_ROW_FLAG', flag)
+ return '' \
+ if flag is None \
+ else self.p_temp.get(
+ 'LEADERBOARD_ROW_FLAG',
+ ''
+ if bool(urlparse.urlparse(flag).netloc)
+ else 'images/',
+ flag)