On 09/11/16 09:42, Swapnil Abnave wrote: > In case of foreman a delete on architecture with --id='' is actually > making an API call which it shouldn't and validate *--id *option prior. > > | > [vagrant@centos7-hammer-devel hammer-cli-katello]$ hammer -s > localhost:3000architecture delete--id='' > Couldnotdeletethe architecture: > 404NotFound > | > > Debug trace for above query: https://da.gd/Q58G > > -- > > I found `class Number` is a normalizer > https://github.com/theforeman/hammer-cli/blob/36419717ad2ea6e012e8a6bb7623258e6e48f009/lib/hammer_cli/options/normalizers.rb#L94 > But not sure how options are defined of that type(Numeric in this case).
Foreman's "id" fields are not numeric, they're identifiers which permit either numbers or strings and so the numeric normaliser would not be used automatically. An empty string is of the correct type. The API docs describe the fields as strings but with a human-readable validator description alongside. -- Dominic Cleal domi...@cleal.org -- You received this message because you are subscribed to the Google Groups "foreman-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to foreman-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.