liquid_feedback_frontend
annotate env/lf4rcs/render_draft_reference.lua @ 1413:3dbfac432576
Fixed endless loop while sending notification when not issue is created yet
| author | bsw | 
|---|---|
| date | Sun Aug 26 13:38:14 2018 +0200 (2018-08-26) | 
| parents | 30523f31b186 | 
| children | 
| rev | line source | 
|---|---|
| bsw@1219 | 1 function lf4rcs.render_draft_reference(draft, wrapper) | 
| bsw@1219 | 2 local repository, path, url = lf4rcs.get_config(draft.initiative.issue.area.unit) | 
| bsw@1219 | 3 if not (config.lf4rcs[repository] and config.lf4rcs[repository].render_draft_reference) then | 
| bsw@1219 | 4 error("Unsupported repository type") | 
| bsw@1219 | 5 end | 
| bsw@1219 | 6 if draft.external_reference then | 
| bsw@1219 | 7 wrapper(function() | 
| bsw@1219 | 8 config.lf4rcs[repository].render_draft_reference(url, draft) | 
| bsw@1219 | 9 end) | 
| bsw@1219 | 10 end | 
| bsw@1219 | 11 end | 
| bsw@1219 | 12 |