mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 09:51:22 -06:00
Implement tag replication for #33
This commit is contained in:
parent
446acbdf82
commit
b05566e96f
@ -39,7 +39,9 @@ def clone_button(url, instance):
|
|||||||
if field_value not in (None, ''):
|
if field_value not in (None, ''):
|
||||||
params[field_name] = field_value
|
params[field_name] = field_value
|
||||||
|
|
||||||
# TODO: Tag replication
|
# Copy tags
|
||||||
|
if hasattr(instance, 'tags'):
|
||||||
|
params['tags'] = ','.join([t.name for t in instance.tags.all()])
|
||||||
|
|
||||||
# Append parameters to URL
|
# Append parameters to URL
|
||||||
param_string = '&'.join(['{}={}'.format(k, v) for k, v in params.items()])
|
param_string = '&'.join(['{}={}'.format(k, v) for k, v in params.items()])
|
||||||
|
Loading…
Reference in New Issue
Block a user