stash visibility
This commit is contained in:
parent
23164af04f
commit
1853577ff5
26 changed files with 276 additions and 39 deletions
7
testdata/generate_testdata.py
vendored
7
testdata/generate_testdata.py
vendored
|
|
@ -280,6 +280,7 @@ def generate_locations_csv(count):
|
|||
'category': '',
|
||||
'parent': '',
|
||||
'path': name,
|
||||
'visibility_policy': 'friends',
|
||||
})
|
||||
|
||||
# Second pass: create remaining locations, some as children
|
||||
|
|
@ -302,12 +303,13 @@ def generate_locations_csv(count):
|
|||
'category': '',
|
||||
'parent': parent_id,
|
||||
'path': path,
|
||||
'visibility_policy': 'friends',
|
||||
})
|
||||
location_id_map[name] = str(current_id)
|
||||
current_id += 1
|
||||
|
||||
output = io.StringIO()
|
||||
fieldnames = ['id', 'name', 'description', 'category', 'parent', 'path']
|
||||
fieldnames = ['id', 'name', 'description', 'category', 'parent', 'path', 'visibility_policy']
|
||||
writer = csv.DictWriter(output, fieldnames=fieldnames)
|
||||
writer.writeheader()
|
||||
writer.writerows(rows)
|
||||
|
|
@ -386,6 +388,7 @@ def generate_inventory_csv(count, num_locations, location_id_map, item_range=Non
|
|||
'description': description,
|
||||
'category': category_handle,
|
||||
'availability_policy': policy,
|
||||
'visibility_policy': 'friends',
|
||||
'owned_quantity': str(qty),
|
||||
'storage_location': location,
|
||||
'tags': ', '.join(tags_for_item),
|
||||
|
|
@ -395,7 +398,7 @@ def generate_inventory_csv(count, num_locations, location_id_map, item_range=Non
|
|||
})
|
||||
|
||||
output = io.StringIO()
|
||||
fieldnames = ['id', 'name', 'description', 'category', 'availability_policy',
|
||||
fieldnames = ['id', 'name', 'description', 'category', 'availability_policy', 'visibility_policy',
|
||||
'owned_quantity', 'storage_location', 'tags', 'properties', 'files', 'created_at']
|
||||
writer = csv.DictWriter(output, fieldnames=fieldnames)
|
||||
writer.writeheader()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue