-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #536 from MetaPhase-Consulting/feature/bid_handsha…
…ke_active Return active and active_handshake_perdet status to bureau position
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import logging | ||
import pydash | ||
|
||
from talentmap_api.bidding.models import BidHandshake | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
def get_position_handshake_data(cp_id): | ||
''' | ||
Return whether the cycle position is active, and if so, to which perdet possesses the active handshake | ||
''' | ||
props = { | ||
'active_handshake_perdet': None, | ||
} | ||
|
||
perdet = BidHandshake.objects.filter(cp_id=cp_id).exclude(status='R').values_list("bidder_perdet", flat=True) | ||
|
||
if perdet: | ||
props['active_handshake_perdet'] = perdet.first() | ||
|
||
return props |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters