Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change model lazy-assignment property functions to return "Unknown" #95

Open
AetherUnbound opened this issue Dec 31, 2021 · 1 comment
Labels
backend Related to the backend/server-side frontend Related to the frontend/client-side good first issue Good for newcomers hacktoberfest Good hacktoberfest issues

Comments

@AetherUnbound
Copy link
Collaborator

AetherUnbound commented Dec 31, 2021

Based on discussion in #91, we should change the other functions on the Officer model to return "Unknown" directly rather than default to it in the template.

Here are the functions used within the template:

<dd>{{ officer.job_title()|default('Unknown') }}</dd>
<dt>Unit</dt>
<dd>{{ officer.unit_descrip()|default('Unknown') }}</dd>
<dt>Currently on the Force</dt>
<dd>{{ officer.currently_on_force() }}</dd>
<dt>Known incidents</dt>
<dd>{{ officer.incidents | length }}</dd>
</dl>
</div>
<div class="col-md-6 col-xs-6">
<dl>
<dt>Race</dt>
<dd>{{ officer.race_label()|default('Unknown')|lower|title }}</dd>
<dt>Gender</dt>
<dd>{{ officer.gender_label()|default('Unknown') }}</dd>

The functions to modify would be Officer::job_title, Officer::unit_descrip, Officer::race_label, and Officer::gender_label.

@AetherUnbound AetherUnbound added backend Related to the backend/server-side frontend Related to the frontend/client-side labels Dec 31, 2021
@AetherUnbound AetherUnbound added hacktoberfest Good hacktoberfest issues good first issue Good for newcomers labels Oct 2, 2022
@rsk2
Copy link

rsk2 commented Dec 21, 2023

Hi @AetherUnbound, hope you're doing well. I am not sure if you remember but I have contributed in the past to this repository.

Can I help with this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to the backend/server-side frontend Related to the frontend/client-side good first issue Good for newcomers hacktoberfest Good hacktoberfest issues
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants