File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -833,15 +833,15 @@ def get_security(unique_id: str) -> Optional[str]:
833833 return None
834834 sec = securities_map [unique_id ]
835835 ticker = sec .ticker
836- # Treasury bill and bond start with 912
837- if ticker .startswith ("912" ):
838- # Prepend "T" to make it a valid ticker
839- ticker = "T" + ticker
840836 if ticker is None :
841837 results .add_error (
842838 'Missing ticker for security %r. You must specify it manually using a commodity directive with a cusip metadata field.'
843839 % (unique_id , ))
844840 return None
841+ # Treasury bill and bond start with 912
842+ if ticker .startswith ("912" ):
843+ # Prepend "T" to make it a valid ticker
844+ ticker = "T" + ticker
845845 if not is_valid_commodity_name (ticker ):
846846 results .add_error (
847847 'Ticker %r for security %r is not a valid commodity name. You must specify it manually using a commodity directive with a cusip metadata field.'
You can’t perform that action at this time.
0 commit comments