mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-25 09:13:05 +08:00
Merge pull request #4570 from artoscinote/ma_SCI_7357
Only render last label in ZPL [SCI-7357]
This commit is contained in:
commit
eec5fd9ab3
1 changed files with 3 additions and 1 deletions
|
@ -130,7 +130,9 @@ class LabelTemplatesController < ApplicationController
|
|||
|
||||
def zpl_preview
|
||||
service = LabelTemplatesPreviewService.new(params, current_user)
|
||||
payload = service.generate_zpl_preview!
|
||||
|
||||
# only render last generated label image
|
||||
payload = service.generate_zpl_preview!.split.last
|
||||
|
||||
if service.error.blank?
|
||||
render json: { base64_preview: payload }
|
||||
|
|
Loading…
Reference in a new issue