<commit_before>
$(document).on('data.app', function() {
	var sets_in_deck = {};
	NRDB.data.cards.find().forEach(function(card) {
		var indeck = 0;
		if (SelectedDeck.slots[card.code]) {
			indeck = parseInt(SelectedDeck.slots[card.code], 10);
			sets_in_deck[card.pack_code] = 1;
		}
		NRDB.data.cards.updateById(card.code, {
			indeck : indeck,
			factioncost : card.factioncost || 0
		});
	});

	var mwl_code = SelectedDeck.code, mwl_record = mwl_code && NRDB.data.mwl.findById(mwl_code);
	MWL = mwl_record;
<commit_msg>Simplify the MWL selection code on the deckview.<commit_after>
$(document).on('data.app', function() {
	var sets_in_deck = {};
	NRDB.data.cards.find().forEach(function(card) {
		var indeck = 0;
		if (SelectedDeck.slots[card.code]) {
			indeck = parseInt(SelectedDeck.slots[card.code], 10);
			sets_in_deck[card.pack_code] = 1;
		}
		NRDB.data.cards.updateById(card.code, {
			indeck : indeck,
			factioncost : card.factioncost || 0
		});
	});

	MWL = SelectedDeck.code && NRDB.data.mwl.findById(SelectedDeck.code);

{'fraction_non_alphanumeric': 0.16393442622950818, 'fraction_numerical': 0.009643201542912247, 'mean_word_length': 4.295918367346939, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5768031', 'n_tokens_mistral': 448, 'n_tokens_neox': 405, 'n_words': 62}