Closed PedroHLC closed 6 years ago
15:54:24.747 [error] Process #PID<0.877.0> raised an exception ** (Ecto.NoResultsError) expected at least one result but got none in query:
from c in Helix.Story.Model.Story.Context, where: c.entity_id == ^%Helix.Entity.Model.Entity.ID{id: {1, 0, 0, 18168, 54415, 62669, 64709, 36805}, root: Helix.Entity.Model.Entity}, lock: "FOR UPDATE"
(ecto) lib/ecto/repo/queryable.ex:80: Ecto.Repo.Queryable.one!/4 (helix) lib/story/internal/context.ex:36: Helix.Story.Internal.Context.fetch_for_update/1 (helix) lib/story/internal/context.ex:62: anonymous fn/3 in Helix.Story.Internal.Context.save/3 (ecto) lib/ecto/adapters/sql.ex:576: anonymous fn/3 in Ecto.Adapters.SQL.do_transaction/3 (db_connection) lib/db_connection.ex:1275: DBConnection.transaction_run/4 (db_connection) lib/db_connection.ex:1199: DBConnection.run_begin/3 (db_connection) lib/db_connection.ex:790: DBConnection.transaction/3 (helix) lib/story/mission/tutorial/steps.ex:54: Helix.Story.Model.Steppable.Helix.Story.Mission.Tutorial.DownloadCrackerPublicFtp.setup/2
* Request: ```json {"topic":"account:1::46f8:d48f:f4cd:fcc5:8fc5","event":"email.reply","ref":5,"payload":{"reply_id":"back_thanks"}}
Did it happen with a fresh account?
No, that solved it!
Then it's a migration bug -> #367
from c in Helix.Story.Model.Story.Context, where: c.entity_id == ^%Helix.Entity.Model.Entity.ID{id: {1, 0, 0, 18168, 54415, 62669, 64709, 36805}, root: Helix.Entity.Model.Entity}, lock: "FOR UPDATE"