Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion migratePKCategories.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ def getorCreateLocation(part):
for loc in itloca:
if (loc.name == part.storageLocation):
return loc
return 0
return StockLocation.create(api, {
'name': part.storageLocation,
'parent': ""
})

else:
#create or return unknownloadtion
Expand All @@ -107,6 +110,7 @@ def createITPart(part,ITCat):
np = Part.create(api, {
'name' : part.name,
'description' : part.description,
'notes' : part.comment,
'category' : ITCat.pk,
'active' : True,
'virtual' : False,
Expand Down
1 change: 1 addition & 0 deletions partkeepr.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def __init__(self,req):
#print (req["name"])
self.name = req["name"]
self.description = req["description"]
self.comment = req["comment"]
self.id = req["@id"][req["@id"].rfind("/")+1:]
try:
self.footprint = req["footprint"]["name"]
Expand Down