Skip to content

Commit

Permalink
Don't set a page to live if it is not already live
Browse files Browse the repository at this point in the history
  • Loading branch information
nickmoreton committed Aug 1, 2023
1 parent 8905aea commit 6cd2117
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wagtail_qrcode/wagtail_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ def generate_qr_code(request, page):
page.qr_code_eps = document

rev = page.save_revision()
rev.publish()

if page.live:
rev.publish()


def send_qr_code_email(page, email=None, subject=None, body=None):
Expand Down

0 comments on commit 6cd2117

Please sign in to comment.