X-Git-Url: https://git.cworth.org/git?p=turbot;a=blobdiff_plain;f=turbot%2Fpuzzle.py;h=b361b10f3d322ce5efb43abd92c3e978e3e8c9d3;hp=e3a4f741580f711d0c36df9f459a265fd364b266;hb=3385d460742786491db31c1587a86886a3e1b6c8;hpb=1efdf784442e0bfc0fb96a18ec833e2801af7973 diff --git a/turbot/puzzle.py b/turbot/puzzle.py index e3a4f74..b361b10 100644 --- a/turbot/puzzle.py +++ b/turbot/puzzle.py @@ -293,3 +293,12 @@ def puzzle_update_channel_and_sheet(turb, puzzle, old_puzzle=None): channel=channel_id, name=channel_name ) + +# A copy deep enough to work for puzzle_update_channel_and_sheet above +def puzzle_copy(old_puzzle): + new_puzzle = old_puzzle.copy() + + if 'tags' in old_puzzle: + new_puzzle['tags'] = old_puzzle['tags'].copy() + + return new_puzzle