raid-guild / gitcoinco-web

Grow Open Source
https://gitcoin.co
Other
0 stars 2 forks source link

Added PersonalToken model #27

Closed vporton closed 4 years ago

vporton commented 4 years ago
Description

I added PersonalToken model.

For the task at hand, to filter users having a personal token, do so:

if only_users_with_personal_token:
    users_list = users_list.select_related('personal_token')

This way is a little inconvenient and counterintuitive, but it is a mathematically correct model (one-to-one relation, as it is understood by Django). Don't expect mathematically correct DB relations to be quite intuitive.

Testing

Only tested that it compiles. We will test it together with the frontend, as testing now would be extra work that is not really necessary.

proofoftom commented 4 years ago

This unfortunately is overlap with #32 and #33. Closing this in favor of those