Skip to content

Commit

Permalink
Do Not Require Lock Version In URL Parameters (#2268)
Browse files Browse the repository at this point in the history
* Do not pattern match on a query param

* Update CHANGELOG.md

---------

Co-authored-by: Taylor Downs <[email protected]>
  • Loading branch information
elias-ba and taylordowns2000 authored Jul 10, 2024
1 parent 348c80b commit 86f3337
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ and this project adheres to

### Fixed

- Do Not Require Lock Version In URL Parameters
[#2267](https://github.com/OpenFn/lightning/pull/2267)
- Trim erroneous spaces on user first and last names
[#2269](https://github.com/OpenFn/lightning/pull/2269)

Expand Down
8 changes: 3 additions & 5 deletions lib/lightning_web/live/workflow_live/edit.ex
Original file line number Diff line number Diff line change
Expand Up @@ -920,11 +920,7 @@ defmodule LightningWeb.WorkflowLive.Edit do
|> assign(page_title: "New Workflow")
end

def apply_action(
socket,
:edit,
%{"id" => workflow_id, "v" => version} = params
) do
def apply_action(socket, :edit, %{"id" => workflow_id} = params) do
case socket.assigns.workflow do
%{id: ^workflow_id} ->
socket
Expand All @@ -943,6 +939,8 @@ defmodule LightningWeb.WorkflowLive.Edit do

if workflow do
run_id = Map.get(params, "a")
version = Map.get(params, "v") || workflow.lock_version

snapshot = snapshot_by_version(workflow.id, version)

socket
Expand Down

0 comments on commit 86f3337

Please sign in to comment.