Skip to content

Commit 9d4ce57

Browse files
vvgrem@gmail.comvvgrem@gmail.com
authored andcommitted
v 2.2.1.1 Fix for SharePoint API Change
1 parent 39a3d48 commit 9d4ce57

File tree

12 files changed

+20
-142
lines changed

12 files changed

+20
-142
lines changed

office365/runtime/odata/odata_metadata_level.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class ODataMetadataLevel:
2-
"""The amount of metadata information to serialize in an OData response (for JSON light)."""
2+
"""The amount of metadata information to serialize in an OData response."""
33
def __init__(self):
44
pass
55

office365/sharepoint/changes/change_collection.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,18 @@ def resolve_change_type(self, properties):
2323
from office365.sharepoint.changes.change_content_type import ChangeContentType
2424
from office365.sharepoint.changes.change_alert import ChangeAlert
2525
from office365.sharepoint.changes.change_field import ChangeField
26+
from office365.sharepoint.changes.change_item import ChangeItem
2627

27-
if "WebId" in properties:
28+
if "ListId" in properties and "WebId" in properties:
29+
self._item_type = ChangeList
30+
elif "ItemId" in properties and "ListId" in properties:
31+
self._item_type = ChangeItem
32+
elif "WebId" in properties:
2833
self._item_type = ChangeWeb
2934
elif "UserId" in properties:
3035
self._item_type = ChangeUser
3136
elif "GroupId" in properties:
3237
self._item_type = ChangeGroup
33-
elif "ListId" in properties:
34-
self._item_type = ChangeList
3538
elif "ContentTypeId" in properties:
3639
self._item_type = ChangeContentType
3740
elif "AlertId" in properties:

office365/sharepoint/listitems/caml/camlquery_builder.py

Lines changed: 0 additions & 76 deletions
This file was deleted.

office365/sharepoint/listitems/caml/querystring_builder.py

Lines changed: 0 additions & 52 deletions
This file was deleted.

office365/sharepoint/listitems/caml/utils.py

Lines changed: 0 additions & 2 deletions
This file was deleted.

office365/sharepoint/listitems/listitem.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from office365.runtime.resource_path import ResourcePath
77
from office365.runtime.resource_path_service_operation import ResourcePathServiceOperation
88
from office365.sharepoint.changes.change_collection import ChangeCollection
9+
from office365.sharepoint.changes.change_query import ChangeQuery
910
from office365.sharepoint.fields.fieldLookupValue import FieldLookupValue
1011
from office365.sharepoint.fields.fieldMultiLookupValue import FieldMultiLookupValue
1112
from office365.sharepoint.permissions.securable_object import SecurableObject
@@ -30,12 +31,14 @@ def recycle(self):
3031
self.context.add_query(qry)
3132
return result
3233

33-
def get_changes(self, query):
34+
def get_changes(self, query=None):
3435
"""Returns the collection of changes from the change log that have occurred within the ListItem,
3536
based on the specified query.
3637
3738
:param office365.sharepoint.changeQuery.ChangeQuery query: Specifies which changes to return
3839
"""
40+
if query is None:
41+
query = ChangeQuery(item=True)
3942
changes = ChangeCollection(self.context)
4043
qry = ServiceOperationQuery(self, "getChanges", None, query, "query", changes)
4144
self.context.add_query(qry)

office365/sharepoint/lists/list.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from office365.sharepoint.files.checkedOutFileCollection import CheckedOutFileCollection
1212
from office365.sharepoint.folders.folder import Folder
1313
from office365.sharepoint.forms.formCollection import FormCollection
14-
from office365.sharepoint.listitems.caml.camlQuery import CamlQuery
14+
from office365.sharepoint.listitems.caml.caml_query import CamlQuery
1515
from office365.sharepoint.listitems.listitem import ListItem
1616
from office365.sharepoint.listitems.listItem_collection import ListItemCollection
1717
from office365.sharepoint.permissions.securable_object import SecurableObject
@@ -153,7 +153,10 @@ def get_related_fields(self):
153153
ResourcePathServiceOperation("getRelatedFields", [], self.resource_path))
154154

155155
def delete_object(self):
156-
"""Deletes the list."""
156+
"""Deletes the list.
157+
158+
:rtype: List
159+
"""
157160
qry = DeleteEntityQuery(self)
158161
self.context.add_query(qry)
159162
self.remove_from_parent_collection()

office365/sharepoint/views/view.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from office365.runtime.resource_path_service_operation import ResourcePathServiceOperation
55
from office365.sharepoint.base_entity import BaseEntity
66
from office365.sharepoint.contenttypes.content_type_id import ContentTypeId
7-
from office365.sharepoint.listitems.caml.camlQuery import CamlQuery
7+
from office365.sharepoint.listitems.caml.caml_query import CamlQuery
88
from office365.sharepoint.views.view_field_collection import ViewFieldCollection
99

1010

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setup(
1212
name="Office365-REST-Python-Client",
13-
version="2.2.0",
13+
version="2.2.1.1",
1414
author="Vadim Gremyachev",
1515
author_email="vvgrem@gmail.com",
1616
maintainer="Konrad Gądek",

0 commit comments

Comments
 (0)