Not sure if this related to the major disruption reported earlier.
I create a new table row with add_row()
and get the row id from the returned row to be able to later fetch it with get_by_id()
.
row_id = app_tables.shifts.add_row(**col_to_fill).get_id()
shift = app_tables.shifts.get_by_id(row_id)
This worked perfectly until this morning.
Now, when I use the row_id
as returned by get_id()
in get_by_id
, it returns None.
After investigating, I found that get_id()
returns a string that looks like this: “[<table_id>,<row_id>]”, but get_by_id()
expects just the row_id string. So I need to extract the row_id before calling get_by_id()
.
I’ve changed my code to this and it works.
table_row_id = app_tables.shifts.add_row(**col_to_fill).get_id()
row_id = table_row_id.split(",")[-1].strip("[]")
shift = app_tables.shifts.get_by_id(row_id)
I don’t know which of get_id()
or get_by_id()
changed, or if I’m missing something entirely.
Has anyone else encountered the same problem?