Exemple #1
0
    def put(self, *args, **kw):
        new_model = kw_to_sqlalchemy(model.JobAlchemy, kw)

        prepare_job_for_address_update(new_model)
        kw = sqlalchemy_to_kw(new_model)

        return EasyCrudRestController.put(self, *args, **kw)
Exemple #2
0
    def put(self, *args, **kw):
        new_model = kw_to_sqlalchemy(model.CompanyAlchemy, kw)

        prepare_company_for_validation(new_model)
        kw = sqlalchemy_to_kw(new_model)

        return EasyCrudRestController.put(self, *args, **kw)
Exemple #3
0
    def put(self, *args, **kw):
        new_model = kw_to_sqlalchemy(model.JobAlchemy, kw)

        prepare_job_for_address_update(new_model)
        kw = sqlalchemy_to_kw(new_model)

        return EasyCrudRestController.put(self, *args, **kw)
Exemple #4
0
    def put(self, *args, **kw):
        new_model = kw_to_sqlalchemy(model.CompanyAlchemy, kw)

        prepare_company_for_validation(new_model)
        kw = sqlalchemy_to_kw(new_model)

        return EasyCrudRestController.put(self, *args, **kw)
Exemple #5
0
    def put(self, *args, **kw):
        old_model = model.CompanyAlchemy.get_company(kw['id'])
        new_model = kw_to_sqlalchemy(model.CompanyAlchemy, kw)

        # Check if the address has been modified. If it's the case, then
        # prepare the kw dict before insertion.
        if old_model.address != new_model.address:
            prepare_company_for_address_update(new_model)

        kw = sqlalchemy_to_kw(new_model)

        return EasyCrudRestController.put(self, *args, **kw)
Exemple #6
0
    def put(self, *args, **kw):
        old_model = model.CompanyAlchemy.get_company(kw['id'])
        new_model = kw_to_sqlalchemy(model.CompanyAlchemy, kw)

        # Check if the address has been modified. If it's the case, then
        # prepare the kw dict before insertion.
        if old_model.address != new_model.address:
            prepare_company_for_address_update(new_model)

        kw = sqlalchemy_to_kw(new_model)

        return EasyCrudRestController.put(self, *args, **kw)
Exemple #7
0
    def put(self, *args, **kw):
        # TODO: Could this test be removed if 'publication_datetime_is_fake'
        # TODO: was False by default and un-nullable
        if not kw['publication_datetime_is_fake']:
            kw['publication_datetime_is_fake'] = False

        old_model = model.JobAlchemy.get_job_offer(kw['id'])
        new_model = kw_to_sqlalchemy(model.JobAlchemy, kw)

        # Check if the address has been modified. If it's the case, then
        # prepare the kw dict before insertion.
        if old_model.address != new_model.address:
            prepare_job_for_address_update(new_model)

        kw = sqlalchemy_to_kw(new_model)

        return EasyCrudRestController.put(self, *args, **kw)
Exemple #8
0
    def put(self, *args, **kw):
        # TODO: Could this test be removed if 'publication_datetime_is_fake'
        # TODO: was False by default and un-nullable
        if not kw['publication_datetime_is_fake']:
            kw['publication_datetime_is_fake'] = False

        old_model = model.JobAlchemy.get_job_offer(kw['id'])
        new_model = kw_to_sqlalchemy(model.JobAlchemy, kw)

        # Check if the address has been modified. If it's the case, then
        # prepare the kw dict before insertion.
        if old_model.address != new_model.address:
            prepare_job_for_address_update(new_model)

        kw = sqlalchemy_to_kw(new_model)

        return EasyCrudRestController.put(self, *args, **kw)