Project

General

Profile

Actions

Bug #17252

closed

Unable to set empty parameter via hammer

Added by Tomáš Strachota about 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Hammer core
Target version:
Difficulty:
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

Hammer doesn't allow to to send nil values, which prevents users from re-setting attributes to their default values in some cases. The only thing a user can do is to send empty string --param="" but it's not the same as nil.

From the discussions about this topic it seems that one of the solutions could be to use a reserved value, that would be translated to nil internally. Users could override the value using some env variable.
For example:

hammer domain update --name test --dns nil
HAMMER_NIL=None hammer domain update --name test --dns None


Related issues 5 (0 open5 closed)

Related to Hammer CLI - Bug #13994: Cannot dis-associate a Subnet from a Domain using HammerClosedActions
Related to Hammer CLI - Bug #17250: Unable to remove all locations or organizations from a domainClosedActions
Related to Hammer CLI - Tracker #2823: Tracker for usability issuesClosed

Actions
Related to Hammer CLI - Bug #21768: Support NIL values in searchable optionsClosedMartin Bacovsky11/26/2017Actions
Related to Hammer CLI - Bug #22009: Invalid routes with NIL as a route param are selectedClosedMartin Bacovsky12/18/2017Actions
Actions

Also available in: Atom PDF