diff options
| author | bozo.kopic <bozo@kopic.xyz> | 2022-10-02 21:53:01 +0200 |
|---|---|---|
| committer | bozo.kopic <bozo@kopic.xyz> | 2022-10-02 21:53:01 +0200 |
| commit | 26b2dee4ef3f0a00bd6fb2989ada48ad9b054972 (patch) | |
| tree | 67eebc8d81b861123c92a44cdda41aab65082928 | |
| parent | 5c66aefbf9636b2a4551400a2c9510d5a3fc77b7 (diff) | |
server generate output bugfixv0.4.1
| -rw-r--r-- | VERSION | 2 | ||||
| -rw-r--r-- | src_js/common.js | 6 | ||||
| -rw-r--r-- | src_py/opcut/server.py | 4 |
3 files changed, 8 insertions, 4 deletions
@@ -1 +1 @@ -0.4.0 +0.4.1 diff --git a/src_js/common.js b/src_js/common.js index b489914..1d718b8 100644 --- a/src_js/common.js +++ b/src_js/common.js @@ -29,9 +29,13 @@ export async function calculate() { if (!res.ok) throw await res.text(); const result = await res.json(); + const selected = { + panel: Object.keys(result.params.panels)[0], + item: null + }; r.change(u.pipe( u.set('result', result), - u.set('selected', states.main.selected) + u.set('selected', selected) )); if (!result) throw 'Could not resolve calculation'; diff --git a/src_py/opcut/server.py b/src_py/opcut/server.py index 379a571..8501aaa 100644 --- a/src_py/opcut/server.py +++ b/src_py/opcut/server.py @@ -94,10 +94,10 @@ class Server(aio.Resource): output = await _generate(output_format, panel, result) - if output_format == common.OutputType.PDF: + if output_format == common.OutputFormat.PDF: content_type = 'application/pdf' - elif output_format == common.OutputType.SVG: + elif output_format == common.OutputFormat.SVG: content_type = 'image/svg+xml' else: |
