Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/source/mappings.cr
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ module PlaceOS::Source

# Look up module's driver_id
driver_id = state.drivers[module_id]?
if driver_id.nil?
if mod = Model::Module.find(module_id)
driver_id = mod.driver_id.not_nil!
write { |new_state| new_state.drivers[module_id] = driver_id }
end
end

# Complain if we couldn't find it
if driver_id.nil?
Log.warn { "missing driver_id for Module<#{module_id}>" }
return
Expand Down