Merge branch 'develop' into standalone_develop

This commit is contained in:
2022-09-23 17:56:58 +08:00

View File

@@ -20,7 +20,7 @@ class TimeableVisitRecord < ApplicationRecord
belongs_to :project
def self.build(project_id)
week = TimeableVisitRecord.find_or_create_by!(time: Date.today.cweek, project_id: project_id)
week = TimeableVisitRecord.find_or_create_by!(time: Date.today.strftime("%Y-%W"), project_id: project_id)
month = TimeableVisitRecord.find_or_create_by!(time: Date.today.strftime("%Y%m"), project_id: project_id)
return week, month