Skip to content

Commit 963f6d4

Browse files
Merge pull request #130 from stuartcampbell/quick_fix
Quick fix for field name
2 parents e12eade + d29df4e commit 963f6d4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/nsls2api/services/sync_service.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ async def worker_synchronize_cycles_from_pass(
114114
pass_id=str(pass_cycle.ID),
115115
)
116116

117-
updated_cycle = await Cycle.find_one(Cycle.name == pass_cycle.Name, Cycle.facility == facility.facility_name).upsert(
117+
updated_cycle = await Cycle.find_one(
118+
Cycle.name == pass_cycle.Name, Cycle.facility == facility.facility_id
119+
).upsert(
118120
Set(
119121
{
120122
Cycle.accepting_proposals: cycle.accepting_proposals,
@@ -132,7 +134,9 @@ async def worker_synchronize_cycles_from_pass(
132134
)
133135

134136
# Now let's update the list of proposals for this cycle
135-
proposals_list = await pass_service.get_proposals_allocated_by_cycle(cycle.name, facility=facility_name)
137+
proposals_list = await pass_service.get_proposals_allocated_by_cycle(
138+
cycle.name, facility=facility_name
139+
)
136140
for proposal in proposals_list:
137141
await updated_cycle.update(
138142
AddToSet({Cycle.proposals: str(proposal.Proposal_ID)})

0 commit comments

Comments
 (0)