mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-19 19:55:16 +00:00
Filter out raw_data (#1099)
This commit is contained in:
parent
95580df3ba
commit
245c458f41
1 changed files with 3 additions and 1 deletions
|
|
@ -273,7 +273,9 @@ class Api::Hackatime::V1::HackatimeController < ApplicationController
|
|||
editor: parsed_ua[:editor],
|
||||
operating_system: parsed_ua[:os],
|
||||
machine: request.headers["X-Machine-Name"]
|
||||
})
|
||||
}).slice(*Heartbeat.column_names.map(&:to_sym))
|
||||
# ^^ They say safety laws are written in blood. Well, so is this line!
|
||||
# Basically this filters out columns that aren't in our DB (the biggest one being raw_data)
|
||||
new_heartbeat = Heartbeat.find_or_create_by(attrs)
|
||||
|
||||
queue_project_mapping(heartbeat[:project])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue