import math

from staff.person_profile.controllers.blocks.abstract_block import AbstractBlock


class PaidDayOffBlock(AbstractBlock):
    name = 'paid_day_off'

    fields = {
        'paid_day_off',
    }

    def get_data(self):
        if self.data['paid_day_off'] is not None:
            return {'paid_day_off': math.floor(self.data['paid_day_off'])}
        return {}
