Skip to content

Commit

Permalink
issue #16
Browse files Browse the repository at this point in the history
  • Loading branch information
maxtepkeev committed Mar 14, 2014
1 parent 00bf15a commit 0d7f409
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions redmine/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ class _Resource(object):
query_update = None
query_delete = None

_changes = {}
_includes = ()
_relations = ()
_unconvertible = ()
Expand All @@ -110,6 +109,7 @@ def __init__(self, manager, attributes):
self.attributes.update(dict((relation, None) for relation in self._relations))
self.attributes.update(attributes)
self._readonly += self._relations + self._includes
self._changes = {}

def __getitem__(self, item):
"""Provides a dictionary like access to resource attributes"""
Expand Down Expand Up @@ -169,7 +169,7 @@ def __getattr__(self, item):

def __setattr__(self, item, value):
"""Sets the requested attribute"""
if item in self.__class__.__base__.__dict__:
if item in self.__class__.__base__.__dict__ or item.startswith('_'):
super(_Resource, self).__setattr__(item, value)
elif item in self._readonly:
raise ReadonlyAttrError()
Expand Down

0 comments on commit 0d7f409

Please sign in to comment.