Syslifters / reptor

Other
11 stars 3 forks source link

reptor project rendering with alternate design does not put back previous design #182

Closed danymat closed 2 months ago

danymat commented 2 months ago

Hello, i'm currently facing an issue related to the function duplicate_and_cleanup from the API projects. It is currently used in the `reptor project:

https://github.com/Syslifters/reptor/blob/fbf28f888d82767e34b581f3bb07ad40fcbe7891/reptor/plugins/projects/Project/Project.py#L163-L179

I'm using quite the same idea in my code.

From what i understand, the duplicate_and_cleanup will create a copy of the project with the design updated, and at the end of the with, will delete the project. but on my end, it seems that the design is updated on the originating project.

Trying the reptor project --render --project-id <> --design <> seems to have the same issue.

To reproduce the issue:

  1. create a project with design 1
  2. Render with alternate design 2: reptor project --render --project-id <> --design <design 2>
  3. Check the project settings, that should have design 2
aronmolnar commented 2 months ago

Thank you for reporting.

We investigated the issue and is seems like it appears only when the switch --project-id is used. If the project id is defined in the config (e.g., using reptor conf) the error doesn't happen.

We fixed the issue. The fix will be part of the next release.

aronmolnar commented 2 months ago

Fixed in 0.23

danymat commented 2 months ago

Thanks ! Glad to find out it was a true issue indeed. Cheers :)