mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Remove save after adding an association with <<
`<<` operator already save the the association to the database
This commit is contained in:
@@ -17,8 +17,6 @@ module DfcProvider
|
||||
|
||||
group.enterprises << enterprise
|
||||
|
||||
return head :unprocessable_entity unless group.save
|
||||
|
||||
head :created
|
||||
end
|
||||
|
||||
|
||||
@@ -82,7 +82,6 @@ describe "EnterpriseGroups::AffiliatedBy", type: :request, swagger_doc: "dfc.yam
|
||||
response "204", "no content" do
|
||||
before do
|
||||
group.enterprises << enterprise2
|
||||
group.save!
|
||||
end
|
||||
|
||||
it "removes enterperise from group" do |example|
|
||||
|
||||
Reference in New Issue
Block a user