Skip to content
This repository was archived by the owner on Apr 15, 2024. It is now read-only.

Commit 326adbf

Browse files
committed
backward support for <v0.6.0 (if not specified this option will not be added to the json request)
1 parent 382398c commit 326adbf

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

consul/base.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,9 +738,12 @@ def register(
738738
for more information
739739
https://www.consul.io/docs/agent/services.html
740740
"""
741+
741742
payload = {}
743+
742744
payload['name'] = name
743-
payload['enabletagoverride'] = enable_tag_override
745+
if enable_tag_override:
746+
payload['enabletagoverride'] = enable_tag_override
744747
if service_id:
745748
payload['id'] = service_id
746749
if address:

0 commit comments

Comments
 (0)