piknik

Unnamed repository; edit this file 'description' to name the repository.
Info | Log | Files | Refs | README | LICENSE

commit 50936794b2a511650096230e9eac454238e72220
parent a5374b67346bae6a3679d6622b83a65beb137ffc
Author: lash <dev@holbrook.no>
Date:   Thu, 20 Apr 2023 07:36:34 +0100

Fix runaway recursion bug in html issue render

Diffstat:
MCHANGELOG | 2++
Mpiknik/render/html.py | 13+++++++------
Msetup.cfg | 2+-
3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG @@ -1,3 +1,5 @@ +- 0.3.4 + * Fix endless recursion bug for html issue render introduced in v0.3.3 - 0.3.3 * Enable state filtering controls from cli * Make finished issues not visible by default diff --git a/piknik/render/html.py b/piknik/render/html.py @@ -38,15 +38,17 @@ class Accumulator: if self.msg != None: self.category.add(self.msg) #self.doc.add(self.msg) - self.doc.add(self.category) if self.last_v != None: self.category.add(li(self.last_v)) + self.doc.add(self.category) w.write(self.doc.render()) - return False + self.last_v = None v_id = getattr(v, 'id', '') logg.debug('add id {}'.format(v_id)) if len(v_id) > 1: + if v_id[0] == 's': + self.last_v = v if v_id[:2] == 's_': if self.issue != None: self.category_content.add(self.issue) @@ -72,8 +74,6 @@ class Accumulator: else: self.doc = v self.last_v = None - self.last_v = v - return True class Renderer(BaseRenderer): @@ -89,8 +89,9 @@ class Renderer(BaseRenderer): self.render_mode = 1 v = div(_id='s_' + state.lower()) v.add(h2(state)) - self.add(v) + #self.add(v) super(Renderer, self).apply_state(state, accumulator=accumulator) + return v def apply_issue(self, state, issue, tags, accumulator=None): @@ -135,7 +136,7 @@ class Renderer(BaseRenderer): r_r.add(li(ss)) s.add(dd(r_r)) - r.add(s) + #r.add(s) deps = issue.get_dependencies() s.add(dt('depends on')) diff --git a/setup.cfg b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = piknik -version = 0.3.3 +version = 0.3.4 description = CLI issue tracker author = Louis Holbrook author_email = dev@holbrook.no