Compare commits
2 commits
63e69dc9af
...
35c8dfd21a
Author | SHA1 | Date | |
---|---|---|---|
|
35c8dfd21a | ||
|
c036d042c3 |
1 changed files with 1 additions and 1 deletions
|
@ -65,9 +65,9 @@ def shorten_it(config: dict, session: Session, data: str, ttl: int):
|
|||
_link = Link(data=data, pointers=[])
|
||||
|
||||
_pointer = Pointer(data=identifier, link_id=_link.id, link=_link, ttl=ttl)
|
||||
session.add(_pointer)
|
||||
_link.pointers.append(_pointer)
|
||||
session.add(_link)
|
||||
session.add(_pointer)
|
||||
session.commit()
|
||||
return _pointer.data
|
||||
return None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue