Skip to content

Commit 6b2b675

Browse files
committed
add terminal command run option with 'python3 manage.py remove_orcid_from_social'
1 parent d919e8f commit 6b2b675

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
from django.core.management.base import BaseCommand
12
from django.db.models.expressions import RawSQL
23
from osf.models import OSFUser
34

45

56
def remove_orcid_from_user_social():
67
OSFUser.objects.filter(social__has_key='orcid').update(social=RawSQL("""social #- '{orcid}'""", []))
8+
9+
10+
class Command(BaseCommand):
11+
def handle(self, *args, **kwargs):
12+
breakpoint()
13+
remove_orcid_from_user_social()

0 commit comments

Comments
 (0)