mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Fix Style/ConditionalAssignment errors
They did not get excluded by `--auto-gen-config`
This commit is contained in:
parent
523203ac74
commit
d9a3b0de72
5 changed files with 31 additions and 31 deletions
|
|
@ -29,11 +29,11 @@ class TicketPurchase < ActiveRecord::Base
|
|||
conference.tickets.each do |ticket|
|
||||
quantity = purchases[ticket.id.to_s].to_i
|
||||
# if the user bought the ticket and is still unpaid, just update the quantity
|
||||
if ticket.bought?(user) && ticket.unpaid?(user)
|
||||
purchase = update_quantity(conference, quantity, ticket, user)
|
||||
else
|
||||
purchase = purchase_ticket(conference, quantity, ticket, user)
|
||||
end
|
||||
purchase = if ticket.bought?(user) && ticket.unpaid?(user)
|
||||
update_quantity(conference, quantity, ticket, user)
|
||||
else
|
||||
purchase_ticket(conference, quantity, ticket, user)
|
||||
end
|
||||
|
||||
if purchase && !purchase.save
|
||||
errors.push(purchase.errors.full_messages)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue