-
-
Notifications
You must be signed in to change notification settings - Fork 660
Updated crp-model to include default certificate #5420
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
Open
anurag2787
wants to merge
6
commits into
OWASP:feature/contributor-recognition-program
Choose a base branch
from
anurag2787:crp-model-update
base: feature/contributor-recognition-program
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
8271ab7
Updated crp-model to include deafult certificate
anurag2787 d9e205d
address review
anurag2787 2b46bcf
Address review
anurag2787 9a7060c
Updated order
anurag2787 e47a422
fixed link display
anurag2787 a205c2c
Merge branch 'feature/contributor-recognition-program' into crp-model…
anurag2787 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
63 changes: 63 additions & 0 deletions
63
...src/apps/owasp/migrations/0076_remove_certificate_unique_active_cert_per_tier_and_more.py
This file contains hidden or 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,63 @@ | ||
| # Generated by Django 6.0.8 on 2026-08-13 09:03 | ||
|
|
||
| import django.db.models.deletion | ||
| from django.db import migrations, models | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ('github', '0044_user_indexes'), | ||
| ('owasp', '0075_alter_certificate_id'), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.RemoveConstraint( | ||
| model_name='certificate', | ||
| name='unique_active_cert_per_tier', | ||
| ), | ||
| migrations.AddField( | ||
| model_name='certificate', | ||
| name='chapter', | ||
| field=models.ForeignKey(blank=True, help_text='Associated chapter', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='certificates', to='owasp.chapter'), | ||
| ), | ||
| migrations.AddField( | ||
| model_name='certificate', | ||
| name='issuer', | ||
| field=models.ForeignKey(blank=True, help_text='Issuer GitHub user (for generic certificates)', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='issued_certificates', to='github.user'), | ||
| ), | ||
| migrations.AddField( | ||
| model_name='certificate', | ||
| name='message', | ||
| field=models.TextField(blank=True, default='', help_text='Customizable certificate message', verbose_name='Message'), | ||
| ), | ||
| migrations.AddField( | ||
| model_name='certificate', | ||
| name='project', | ||
| field=models.ForeignKey(blank=True, help_text='Associated project', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='certificates', to='owasp.project'), | ||
| ), | ||
| migrations.RenameField( | ||
| model_name='certificate', | ||
| old_name='github_user', | ||
| new_name='recipient', | ||
|
anurag2787 marked this conversation as resolved.
Outdated
|
||
| ), | ||
| migrations.AddField( | ||
| model_name='certificate', | ||
| name='title', | ||
| field=models.CharField(blank=True, default='', help_text='Certificate title', max_length=255, verbose_name='Title'), | ||
| ), | ||
| migrations.AlterField( | ||
| model_name='certificate', | ||
| name='score', | ||
| field=models.PositiveIntegerField(blank=True, help_text="The contributor's score when the certificate was issued", null=True, verbose_name='Score'), | ||
| ), | ||
| migrations.AlterField( | ||
| model_name='certificate', | ||
| name='tier', | ||
| field=models.CharField(blank=True, choices=[('level_1', 'Level 1'), ('level_2', 'Level 2'), ('level_3', 'Level 3'), ('level_4', 'Level 4')], default='', help_text='The tier at which the certificate was issued', max_length=20, verbose_name='Tier'), | ||
| ), | ||
| migrations.AddConstraint( | ||
| model_name='certificate', | ||
| constraint=models.UniqueConstraint(condition=models.Q(('is_revoked', False), models.Q(('tier', ''), _negated=True)), fields=('recipient', 'tier'), name='unique_active_cert_per_tier', violation_error_message='Cannot have multiple active certificates for same tier'), | ||
|
anurag2787 marked this conversation as resolved.
Outdated
|
||
| ), | ||
| ] | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.