mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Conditionally loading an edit path for standing orders
ie. only if they have an id
This commit is contained in:
@@ -23,6 +23,7 @@ class Api::Admin::StandingOrderSerializer < ActiveModel::Serializer
|
||||
end
|
||||
|
||||
def edit_path
|
||||
return '' unless object.id
|
||||
edit_admin_standing_order_path(object)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user