Skip to content

Commit

Permalink
Assign uuid value to pasture id when importing pasture to avoid over …
Browse files Browse the repository at this point in the history
…writing
  • Loading branch information
Brijesh committed Jul 31, 2024
1 parent df0902f commit 1187dbd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/rangeUsePlanPage/pastures/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ const Pastures = ({ pastures, formik }) => {
onClose={() => setImportPastureModalOpen(false)}
onImport={(pasture) => {
setImportPastureModalOpen(false);
pasture.id = uuid();
push(pasture);
}}
title="Import pasture"
Expand Down

0 comments on commit 1187dbd

Please sign in to comment.