Remove spurious '.id' references
This commit is contained in:
parent
86c3c3fd80
commit
e2aac65dac
@ -767,8 +767,8 @@ def _playlist_move_rows_between_playlists(
|
|||||||
|
|
||||||
for from_row in from_rows:
|
for from_row in from_rows:
|
||||||
plrid = old_row_to_id[from_row]
|
plrid = old_row_to_id[from_row]
|
||||||
update_list.append({"id": plrid, "row_number": next_row})
|
update_list.append({"playlistrow_id": plrid, "row_number": next_row})
|
||||||
update_list.append({"id": plrid, "playlist_id": to_playlist_id})
|
update_list.append({"playlistrow_id": plrid, "playlist_id": to_playlist_id})
|
||||||
next_row += 1
|
next_row += 1
|
||||||
|
|
||||||
session.execute(update(PlaylistRows), update_list)
|
session.execute(update(PlaylistRows), update_list)
|
||||||
@ -837,7 +837,7 @@ def _playlist_move_rows_within_playlist(
|
|||||||
old_row_to_id = _playlist_rows_to_id(from_playlist_id)
|
old_row_to_id = _playlist_rows_to_id(from_playlist_id)
|
||||||
for old_row, new_row in row_changes.items():
|
for old_row, new_row in row_changes.items():
|
||||||
plrid = old_row_to_id[old_row]
|
plrid = old_row_to_id[old_row]
|
||||||
update_list.append({"id": plrid, "row_number": new_row})
|
update_list.append({"playlistrow_id": plrid, "row_number": new_row})
|
||||||
|
|
||||||
# Update database
|
# Update database
|
||||||
session.execute(update(PlaylistRows), update_list)
|
session.execute(update(PlaylistRows), update_list)
|
||||||
|
|||||||
@ -1579,8 +1579,9 @@ class Window(QMainWindow):
|
|||||||
|
|
||||||
def solicit_template_to_use(self, template_prompt: str | None = None) -> int | None:
|
def solicit_template_to_use(self, template_prompt: str | None = None) -> int | None:
|
||||||
"""
|
"""
|
||||||
Have user select a template. Return the template.id, or None if they cancel.
|
Have user select a template. Return the template.playlist_id, or
|
||||||
template_id of zero means don't use a template.
|
None if they cancel. template_id of zero means don't use a
|
||||||
|
template.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
template_name_id_list: list[tuple[str, int]] = []
|
template_name_id_list: list[tuple[str, int]] = []
|
||||||
@ -2040,7 +2041,7 @@ class Window(QMainWindow):
|
|||||||
source_playlist_id = self.current.playlist_id
|
source_playlist_id = self.current.playlist_id
|
||||||
|
|
||||||
for playlist in ds.playlists_all():
|
for playlist in ds.playlists_all():
|
||||||
if playlist.id == source_playlist_id:
|
if playlist.playlist_id == source_playlist_id:
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
playlists.append(playlist)
|
playlists.append(playlist)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user