Commit 0b0694fd authored by Sneha Priscilla's avatar Sneha Priscilla

Added a read only attribute list for preferences

parent 76dbb12b
......@@ -768,6 +768,7 @@ PREFERENCE_FIELDS = (
'receive_own_postings', )
PREF_READ_ONLY_ATTRS = ('http_etag','self_link')
class _Preferences:
def __init__(self, connection, url):
......@@ -812,9 +813,9 @@ class _Preferences:
def save(self):
data = {}
for key in self._preferences:
if self._preferences[key] is not None:
if key not in PREF_READ_ONLY_ATTRS and self._preferences[key] is not None:
data[key] = self._preferences[key]
response, content =, data, 'PUT')
response, content =, data, 'PATCH')
LIST_READ_ONLY_ATTRS = ('bounces_address', 'created_at', 'digest_last_sent_at',
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment