ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ns_dev/Python/NinoCode/Tool_Box/RelativityLib.py
(Generate patch)

Comparing Python/NinoCode/Tool_Box/RelativityLib.py (file contents):
Revision 743 by nino.borges, Thu Nov 5 22:03:15 2020 UTC vs.
Revision 744 by nino.borges, Tue Apr 13 21:40:41 2021 UTC

# Line 105 | Line 105 | class CustomObjectTable(Relativity_Conne
105          self.rlResponse = r.json()
106          
107          rlResponseCode = r.status_code
108 <        print rlResponseCode
108 >        print(rlResponseCode)
109          
110          ## This is the ID of the workspace, which is needed when you update or create new items
111          ## Careful here, if the object that you are loading is a normal object the ID of the workspace will be the parent ID. BUT
# Line 145 | Line 145 | class CustomObjectTable(Relativity_Conne
145                           headers={'X-CSRF-Header':""})
146          rlResponse = r.json()
147          rlResponseCode = r.status_code
148 <        print rlResponseCode
148 >        print(rlResponseCode)
149          self.currentItems = [rlResponse,]
150          self.UpdateFieldMatrix(self.currentItems[0]['__Fields'])
151          self.currentItemCount = len(self.currentItems)
# Line 163 | Line 163 | class CustomObjectTable(Relativity_Conne
163                           data=json.dumps(payload))
164          rlResponse = r.json()
165          rlResponseCode = r.status_code
166 <        print rlResponseCode
166 >        print(rlResponseCode)
167          self.currentItems = rlResponse['Results']
168          #print self.currentItems
169          if self.currentItems:
# Line 186 | Line 186 | class CustomObjectTable(Relativity_Conne
186          #    relatedItemMatrix[i['Relativity Text Identifier']] = i['Parent Artifact']['Artifact ID']
187          #return relatedItemMatrix
188          for i in self.rlResponse['Results']:
189 <            if i['Parent Artifact']['Artifact ID'] in relatedItemMatrix.keys():
189 >            if i['Parent Artifact']['Artifact ID'] in list(relatedItemMatrix.keys()):
190                  relatedItemMatrix[i['Parent Artifact']['Artifact ID']][i['Relativity Text Identifier']] = i['Artifact ID']
191              else:
192                  relatedItemMatrix[i['Parent Artifact']['Artifact ID']]= {i['Relativity Text Identifier']:i['Artifact ID']}
# Line 228 | Line 228 | class CustomObjectTable(Relativity_Conne
228                           data=json.dumps(itemFieldMatrix))
229          rlResponse = r.json()
230          rlResponseCode = r.status_code
231 <        print rlResponseCode
231 >        print(rlResponseCode)
232          artID = rlResponse['Results'][0]['ArtifactID']
233          ## This update wont work here because it's using the old response...  if I need this one day, update.
234          #self.itemMatrix = self.UpdateItemMatrix()

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)