Skip to content

Commit

Permalink
Don't try to save entry if there were no modifications
Browse files Browse the repository at this point in the history
This seems to cause problems with the unique overlay.

Fixes #28
Fixes #33
  • Loading branch information
leonhandreke committed Jun 30, 2014
1 parent 246e676 commit d012d3b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ldapom/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,10 @@ def save(self, entry):
# not exist on the server yet.
changed_attributes = set(filter(lambda attr: len(attr._values) > 0, entry._attributes))

# Don't try to save an empty modification set
if not changed_attributes:
return

# Keep around references to pointers to owned memory with data that is
# still needed.
prevent_garbage_collection = []
Expand Down

0 comments on commit d012d3b

Please sign in to comment.