Skip to content

Commit 5ec3c33

Browse files
authored
Merge pull request #713 from freelawproject/feat-cleanup-architecture-file
chore: Clean up architecture file
2 parents 3f82e8b + 0a96a0d commit 5ec3c33

File tree

2 files changed

+11
-23
lines changed

2 files changed

+11
-23
lines changed

ARCHITECTURE.md

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -49,33 +49,10 @@ To set up a development machine, do the following:
4949

5050
docker exec -it bc2-django python manage.py bootstrap-dev
5151

52-
1. Lookup specific data from CourtListener:
53-
54-
docker exec -it bc2-django python manage.py lookup 64983976
55-
56-
This will use CL API to lookup the Docket `64983976`and output its data in the console. This command also accepts the following command line options:
57-
58-
- `--add`: saves the case in the database
59-
- `--subscribe`: creates a CourtListener docket alert subscription
60-
6152
1. Post something manually in the registered channels:
6253

6354
docker exec -it bc2-django python manage.py post
6455

65-
1. Create mastodon subscription to push notifications:
66-
67-
docker exec -it bc2-django python manage.py mastodon-subscribe
68-
69-
This command requires that the following variables are set in the .env file: `MASTODON_SHARED_KEY`, `MASTODON_PUBLIC_KEY`, `MASTODON_PRIVATE_KEY`and `HOSTNAME`. We added a script to generate the first three variables. Execute the following command to use the script and paste the result in your .env file:
70-
71-
docker exec -it bc2-django python /opt/bigcases2/scripts/get-mastodon-keys.py
72-
73-
Make sure that the `MASTODON_TOKEN` and `MASTODON_SERVER` are set before using the previous command.
74-
75-
1. Delete mastodon subscription to push notifications:
76-
77-
docker exec -it bc2-django python manage.py mastodon-unsubscribe
78-
7956
## Server
8057

8158
### What does the server do?

bc/channel/management/commands/post.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ def add_arguments(self, parser):
4949
)
5050

5151
def handle(self, *args, **options):
52+
group_count = Group.objects.count()
53+
channel_count = Channel.objects.count()
54+
55+
if not group_count and not channel_count:
56+
self.stdout.write(
57+
self.style.ERROR(
58+
"No channels have been configured in the database"
59+
)
60+
)
61+
return
62+
5263
if not options["show_channels"]:
5364
table, mapping = show_channel_groups_table()
5465
else:

0 commit comments

Comments
 (0)