Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
XieXiLin2 committed Jan 20, 2024
1 parent 6b95311 commit a10f21f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
5 changes: 4 additions & 1 deletion nonebot_plugin_cnrail/data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ async def get_search_data(train_code: str, train_date: str) -> Optional[List]:
resp = await client.get("/alias.json")
resp.raise_for_status()

train_code = resp.json()[train_code]
try:
train_code = resp.json()[train_code]
except KeyError:
return None

raw_data = await get_search_data(train_code=train_code, train_date=train_date)
if not raw_data:
Expand Down
12 changes: 4 additions & 8 deletions nonebot_plugin_cnrail/templates/train_table.html.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
}
.card-top,
.card-bottom {
.card-bottom,
.card-end {
display: flex;
flex-direction: column;
padding: 20px;
Expand Down Expand Up @@ -183,16 +184,11 @@
justify-content: space-between;
}
.admin {
font-size: 12px;
color: var(--top-sub-color);
text-align: left;
}
.admin,
.emu_no {
font-size: 12px;
color: var(--top-sub-color);
text-align: right;
text-align: left;
}
.card-bottom {
Expand Down

0 comments on commit a10f21f

Please sign in to comment.