forked from ScoDoc/DocScoDoc
correction creation offre
This commit is contained in:
parent
0d8e7f4268
commit
9898ae5310
@ -62,6 +62,7 @@ from app.entreprises.models import (
|
||||
EntrepriseSite,
|
||||
EntrepriseTaxeApprentissage,
|
||||
)
|
||||
from app import db
|
||||
from app.models import Identite, Departement
|
||||
from app.auth.models import User
|
||||
|
||||
@ -277,9 +278,10 @@ class OffreCreationForm(FlaskForm):
|
||||
|
||||
self.correspondant.choices = [("", "")] + [
|
||||
(correspondant.id, f"{correspondant.nom} {correspondant.prenom}")
|
||||
for correspondant in EntrepriseCorrespondant.query.filter_by(
|
||||
entreprise_id=self.hidden_entreprise_id.data
|
||||
)
|
||||
for correspondant in db.session.query(EntrepriseCorrespondant)
|
||||
.join(EntrepriseSite, EntrepriseCorrespondant.site_id == EntrepriseSite.id)
|
||||
.filter(EntrepriseSite.entreprise_id == self.hidden_entreprise_id.data)
|
||||
.all()
|
||||
]
|
||||
|
||||
self.depts.choices = [
|
||||
@ -323,9 +325,10 @@ class OffreModificationForm(FlaskForm):
|
||||
|
||||
self.correspondant.choices = [("", "")] + [
|
||||
(correspondant.id, f"{correspondant.nom} {correspondant.prenom}")
|
||||
for correspondant in EntrepriseCorrespondant.query.filter_by(
|
||||
entreprise_id=self.hidden_entreprise_id.data
|
||||
)
|
||||
for correspondant in db.session.query(EntrepriseCorrespondant)
|
||||
.join(EntrepriseSite, EntrepriseCorrespondant.site_id == EntrepriseSite.id)
|
||||
.filter(EntrepriseSite.entreprise_id == self.hidden_entreprise_id.data)
|
||||
.all()
|
||||
]
|
||||
|
||||
self.depts.choices = [
|
||||
|
Loading…
Reference in New Issue
Block a user