Compare commits
3 Commits
105a0ad30c
...
d6fd72a45c
Author | SHA1 | Date | |
---|---|---|---|
d6fd72a45c | |||
889485eaab | |||
c6c5a87d8b |
@ -26,7 +26,7 @@ class AffinitiesController < ApplicationController
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
GroupAffinity.upsert_all(affinities)
|
GroupAffinity.upsert_all(affinities, unique_by: :uindex_group_pair)
|
||||||
|
|
||||||
render json: {}, status: :ok
|
render json: {}, status: :ok
|
||||||
rescue ActiveRecord::InvalidForeignKey
|
rescue ActiveRecord::InvalidForeignKey
|
||||||
@ -50,7 +50,7 @@ class AffinitiesController < ApplicationController
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
GroupAffinity.upsert_all(affinities)
|
GroupAffinity.upsert_all(affinities, unique_by: :uindex_group_pair)
|
||||||
|
|
||||||
render json: {}, status: :ok
|
render json: {}, status: :ok
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user