Skip to content

Commit

Permalink
Do not render price form for discarded products
Browse files Browse the repository at this point in the history
This was the previous behavior.
  • Loading branch information
mamhoff committed Sep 28, 2022
1 parent fb721a3 commit d42b0a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/app/views/spree/admin/products/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<%= f.field_container :price do %>
<%= f.label :price, class: Spree::Config.require_master_price ? 'required' : '' %>

<% if f.object.new_record? || f.object.has_default_price? %>
<% if (f.object.new_record? || f.object.has_default_price?) && !f.object.discarded? %>
<%= render "spree/admin/shared/number_with_currency",
f: f,
amount_attr: :price,
Expand Down

0 comments on commit d42b0a0

Please sign in to comment.