Skip to content

Commit

Permalink
use the short_aid for listi and enter interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkobrombin committed Sep 3, 2022
1 parent f0cf371 commit 01204d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion atoms_cli/interfaces/enter.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def run(self):
for _atom in self.__atoms_backend.atoms.values():
if self.__args.aid:
lookup_by = 'aid'
if _atom.aid == self.__args.aid:
if _atom.aid.startswith(self.__args.aid):
atom = _atom
break
elif self.__args.name:
Expand Down
7 changes: 4 additions & 3 deletions atoms_cli/interfaces/list.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sys
import datetime

from atoms_cli.utils.print import Print
from atoms_cli.utils.generic import emojify_atom_name
Expand Down Expand Up @@ -37,11 +38,11 @@ def run(self):

_name = atom.name
_row = [
atom.aid,
atom.short_aid,
emojify_atom_name(atom),
atom.distribution.name,
atom.creation_date,
atom.update_date
datetime.datetime.fromisoformat(atom.creation_date).strftime("%Y-%m-%d %H:%M"),
datetime.datetime.fromisoformat(atom.update_date).strftime("%Y-%m-%d %H:%M"),
]

if self.__args.type in ["container", "all"]:
Expand Down

0 comments on commit 01204d4

Please sign in to comment.