Skip to content

Missing Expected Working Hours #24

@PatrickDEissler

Description

@PatrickDEissler
  File "apps/time_capture/time_capture/scripts/attendance.py", line 57, in _calculate_attendance_metrics

    doc.working_hours - expected_working_hours_full_day,

    ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'

Solution(s):

  • use 0 instead of None
  • Or make error message more explainatory: "No Expected Working Hours found" or something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions