Commit 2d277715269c1bf077b96a9357f7beb647b188a5
1 parent
ed453065
Exists in
master
and in
4 other branches
Set permanent field on PERM status
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
app/commands/commands.py
... | ... | @@ -205,13 +205,15 @@ def feed_from_irap(csv_file_name): |
205 | 205 | if grade is None and a['grade']: |
206 | 206 | grade = AgentBap(name=a['grade']) |
207 | 207 | virtual = 1 if a['virtual'] else 0 |
208 | + permanent = 1 if a['status'] == 'PERM' else 0 | |
208 | 209 | n_a = Agent(firstname=a['firstname'], |
209 | 210 | secondname=a['secondname'], |
210 | 211 | status_id=status.id if status else None, |
211 | 212 | company_id=company.id if company else None, |
212 | 213 | bap_id=bap.id if bap else None, |
213 | 214 | grade_id=grade.id if grade else None, |
214 | - virtual=virtual) | |
215 | + virtual=virtual, | |
216 | + permanent=permanent) | |
215 | 217 | db.session.add(n_a) |
216 | 218 | db.session.commit() |
217 | 219 | ... | ... |