You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/08/02 21:28:00 UTC

[jira] [Commented] (TC-478) Parameter value cannot be set to "0" using the parameters crud API

    [ https://issues.apache.org/jira/browse/TC-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16111751#comment-16111751 ] 

ASF GitHub Bot commented on TC-478:
-----------------------------------

Github user mitchell852 commented on a diff in the pull request:

    https://github.com/apache/incubator-trafficcontrol/pull/758#discussion_r131001497
  
    --- Diff: traffic_ops/app/lib/API/Parameter.pm ---
    @@ -317,7 +317,7 @@ sub update {
     
         my $name = $params->{name} || $find->name;
         my $configFile = $params->{configFile} || $find->config_file;
    -    my $value = $params->{value} || $find->value;
    +    my $value = exists($params->{value}) ?  $params->{value} : $find->value;
    --- End diff --
    
    what does this allow you to do? to set the parameter value to null? is that what you want to do?
    
    it sounds like by the name of the PR you want to set a parameter value to 0...but parameter values are strings so can you set the value to "0" without this change? and is that sufficient?


> Parameter value cannot be set to "0" using the parameters crud API
> ------------------------------------------------------------------
>
>                 Key: TC-478
>                 URL: https://issues.apache.org/jira/browse/TC-478
>             Project: Traffic Control
>          Issue Type: Bug
>          Components: Traffic Ops API
>    Affects Versions: 2.1.0
>            Reporter: Nir Sopher
>
> Example:
> Having a parameter with value=="1"
> Trying to "PUT" a value of "0" in this parameter.
> The value of the parameter stays "1".



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)