memilio icon indicating copy to clipboard operation
memilio copied to clipboard

Using copy_person creates duplicate IDs

Open reneSchm opened this issue 1 year ago • 1 comments

Bug description

Person::copy_person currently also copies the ID of the person. Currently, this is fine, as the function is used exclusively to copy an entire population in the World copy ctor.

However, using this function to duplicate a person in the same populitaion leads to non-unique IDs, which could cause issues elsewhere.

Version

Any

To reproduce

  1. Create an instance of Person.
  2. Call copy_person and obtain a different instance sharing the same ID

Relevant log output

No response

Add any relevant information, e.g. used compiler, screenshots.

No response

Checklist

  • [X] Attached labels, especially loc:: or model:: labels.
  • [X] Linked to project

reneSchm avatar Jan 02 '24 14:01 reneSchm

This will probably be fixed along with #757

reneSchm avatar Jan 02 '24 14:01 reneSchm