Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial fix (read questions please): Problems with copy-paste of nodes. #259

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nightmarebadger
Copy link
Contributor

Partial fix for #255 and minor cleaning.

Moved the if for deleting self.request.session['kotti.paste'] out of the for loop so it's cleaner (we get rid of the count and enumerate(ids), plus we only need one if now instead of (n)).

Partially fixed #255 - we go through the nodes before we start copying now, which does help in some cases. The problem, however, persists if we not only delete some nodes, but after that add some new ones. When we paste, we will get the newly created nodes out of the database instead of the old ones.

PS: This is related to #257, but I separated them because I feel this is way more important (this can cause actual problems) then cleaning up the flash messages, especially because that one could take a while to get merged because of translations.

less if calls and so we can get rid of the count/enumerate.
@dnouri
Copy link
Contributor

dnouri commented Aug 30, 2013

If we can, maybe let's try to not reuse old IDs in our database. I think this would fix most of the problems here.

@nightmarebadger
Copy link
Contributor Author

If possible, would not reusing old ID's during one server session be better? As in, we don't use old ID's, but after the server restarts (and the copy/paste info is lost anyway), we can again use all ID's.

This would probably be even more complicated though, and probably wouldn't bring all that much to the table (I doubt most Kotti sites would have enough content for the ID's to reach really high numbers). Will try to look into SQLAlchemy and see what options we have.

@dnouri
Copy link
Contributor

dnouri commented Sep 12, 2013

I don't think we should care if those IDs will be reused after a server start or not. It won't matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problems with copy-paste of nodes.
2 participants