Skip to content
Snippets Groups Projects
Commit 39afcb47 authored by Cam Saul's avatar Cam Saul
Browse files

fix issue where autocomplete_suggestions would barf if length of

autocomplete str > length of table name
parent a4513a91
No related branches found
No related tags found
No related merge requests found
......@@ -76,7 +76,8 @@
(into {}))
matching-tables (->> (vals table-id->name) ; get all Table names that start with PREFIX
(filter (fn [^String table-name]
(= prefix (.substring table-name 0 prefix-len))))
(and (>= (count table-name) prefix-len)
(= prefix (.substring table-name 0 prefix-len)))))
(map (fn [table-name] ; return them in the format [table_name "Table"]
[table-name "Table"])))
fields (->> (sel :many [Field :name :base_type :special_type :table_id] ; get all Fields with names that start with PREFIX
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment