Skip to content

Commit

Permalink
task/WP-109-remove-unused-django-fields (#887)
Browse files Browse the repository at this point in the history
* task/WP-109-remove-unused-django-fields-v1

* task/WP-109-remove-unused-django-fields-v2

* task/WP-109-remove-unused-django-fields-v3

* task/WP-109-remove-unused-django-fields-v4

---------

Co-authored-by: Taylor Grafft <tgrafft@wireless-10-147-3-50.public.utexas.edu>
Co-authored-by: Taylor Grafft <tgrafft@TACCs-MBP.attlocal.net>
Co-authored-by: Taylor Grafft <tgrafft@wireless-10-147-21-19.public.utexas.edu>
Co-authored-by: Sal Tijerina <r.sal.tijerina@gmail.com>
  • Loading branch information
5 people authored Oct 24, 2023
1 parent f12180a commit e427c97
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 32 deletions.
2 changes: 0 additions & 2 deletions client/src/components/ManageAccount/ManageAccountTables.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ export const ProfileInformation = () => {
{ Header: 'Institution', accessor: 'institution' },
{ Header: 'Country of Residence', accessor: 'country' },
{ Header: 'Country of Citizenship', accessor: 'citizenship' },
{ Header: 'Ethnicity', accessor: 'ethnicity' },
{ Header: 'Gender', accessor: 'gender' },
],
[]
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ const dummyState = {
},
data: {
demographics: {
ethnicity: 'Asian',
gender: 'Male',
bio: '',
website: 'http://owais.io',
orcid_id: 'test',
professional_level: 'Staff (support, administration, etc)',
username: 'ojamil',
email: 'ojamil@tacc.utexas.edu',
firstName: 'Owais',
Expand Down Expand Up @@ -77,8 +71,6 @@ describe('Profile Information Component', () => {
'Institution',
'Country of Residence',
'Country of Citizenship',
'Ethnicity',
'Gender',
];
headings.forEach((heading) => {
expect(getByText(heading)).toBeInTheDocument();
Expand Down
37 changes: 37 additions & 0 deletions server/portal/apps/accounts/migrations/0006_auto_20231018_1927.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Generated by Django 3.2.20 on 2023-10-18 19:27

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('accounts', '0005_auto_20210316_1950'),
]

operations = [
migrations.RemoveField(
model_name='portalprofile',
name='bio',
),
migrations.RemoveField(
model_name='portalprofile',
name='ethnicity',
),
migrations.RemoveField(
model_name='portalprofile',
name='gender',
),
migrations.RemoveField(
model_name='portalprofile',
name='orcid_id',
),
migrations.RemoveField(
model_name='portalprofile',
name='professional_level',
),
migrations.RemoveField(
model_name='portalprofile',
name='website',
),
]
7 changes: 0 additions & 7 deletions server/portal/apps/accounts/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@ class PortalProfile(models.Model):
related_name='profile',
on_delete=models.CASCADE
)
ethnicity = models.CharField(max_length=255)
gender = models.CharField(max_length=255)
bio = models.CharField(max_length=4096, default=None, null=True, blank=True)
website = models.CharField(max_length=256, default=None, null=True, blank=True)
orcid_id = models.CharField(max_length=256, default=None, null=True, blank=True)
professional_level = models.CharField(max_length=256, default=None, null=True)

# Default to False. If PORTAL_USER_ACCOUNT_SETUP_STEPS is empty,
# setup_complete will be set to True on first login
setup_complete = models.BooleanField(default=False)
Expand Down
12 changes: 3 additions & 9 deletions server/portal/fixtures/accounts.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,21 @@
"model": "accounts.portalprofile",
"pk": 1,
"fields": {
"user": 1,
"ethnicity": "",
"gender": ""
"user": 1
}
},
{
"model": "accounts.portalprofile",
"pk": 2,
"fields": {
"user": 2,
"ethnicity": "",
"gender": ""
"user": 2
}
},
{
"model": "accounts.portalprofile",
"pk": 3,
"fields": {
"user": 3,
"ethnicity": "",
"gender": ""
"user": 3
}
},
{
Expand Down
6 changes: 0 additions & 6 deletions server/portal/fixtures/users.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@
"pk": 1,
"fields": {
"user": 1,
"ethnicity": "",
"gender": "",
"bio": null,
"website": null,
"orcid_id": null,
"professional_level": null,
"setup_complete": true
}
}
Expand Down

0 comments on commit e427c97

Please sign in to comment.