Skip to content

Commit 4870151

Browse files
author
Sara Safavi
committed
fix order creation to de-couple item type option from data quick search
1 parent 3bd5e5a commit 4870151

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

planet/scripts/v1.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
)
2323
from .opts import (
2424
asset_type_option,
25-
item_type_option,
2625
bundle_option,
2726
asset_type_perms,
2827
filter_opts,
@@ -35,7 +34,8 @@
3534
AssetTypePerm,
3635
BoundingBox,
3736
metavar_docs,
38-
DateInterval
37+
DateInterval,
38+
ItemType
3939
)
4040
from .util import (
4141
call_and_wrap,
@@ -90,6 +90,7 @@ def filter_dump(**kw):
9090
def quick_search(limit, pretty, sort, **kw):
9191
'''Execute a quick search.'''
9292
req = search_req_from_opts(**kw)
93+
print(req)
9394
cl = clientv1()
9495
page_size = min(limit, MAX_PAGE_SIZE)
9596
echo_json_response(call_and_wrap(
@@ -732,8 +733,12 @@ def cancel_order(order_id, pretty):
732733
type=click.Path(exists=True, resolve_path=True, readable=True,
733734
allow_dash=False, dir_okay=False,
734735
file_okay=True))
735-
@item_type_option
736736
@bundle_option
737+
@click.option(
738+
'--item-type', multiple=False, required=True, type=ItemType(), help=(
739+
'Specify an item type'
740+
)
741+
)
737742
@orders.command('create')
738743
@pretty
739744
def create_order(pretty, **kwargs):

0 commit comments

Comments
 (0)